зеркало из https://github.com/mozilla/pjs.git
Added new style data accessors.
Added nsIMutableStyleContext interface. Made style rules work against nsIMutableStyleContext r=troy
This commit is contained in:
Родитель
752db2e43d
Коммит
1634c730fd
|
@ -24,7 +24,7 @@
|
|||
#include "nsISupports.h"
|
||||
|
||||
class nsIStyleSheet;
|
||||
class nsIStyleContext;
|
||||
class nsIMutableStyleContext;
|
||||
class nsIPresContext;
|
||||
class nsIContent;
|
||||
|
||||
|
@ -42,9 +42,9 @@ public:
|
|||
NS_IMETHOD GetStrength(PRInt32& aStrength) const = 0;
|
||||
|
||||
// Map only font data into style context
|
||||
NS_IMETHOD MapFontStyleInto(nsIStyleContext* aContext, nsIPresContext* aPresContext) = 0;
|
||||
NS_IMETHOD MapFontStyleInto(nsIMutableStyleContext* aContext, nsIPresContext* aPresContext) = 0;
|
||||
// Map all non-font info into style context
|
||||
NS_IMETHOD MapStyleInto(nsIStyleContext* aContext, nsIPresContext* aPresContext) = 0;
|
||||
NS_IMETHOD MapStyleInto(nsIMutableStyleContext* aContext, nsIPresContext* aPresContext) = 0;
|
||||
|
||||
NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const = 0;
|
||||
};
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
* Reserved.
|
||||
*/
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsString.h"
|
||||
#include "nsUnitConversion.h"
|
||||
|
@ -33,6 +34,11 @@ static NS_DEFINE_IID(kIStyleContextIID, NS_ISTYLECONTEXT_IID);
|
|||
// --------------------
|
||||
// nsStyleFont
|
||||
//
|
||||
nsStyleFont::nsStyleFont(void)
|
||||
: mFont(nsnull, NS_FONT_STYLE_NORMAL, NS_FONT_VARIANT_NORMAL, NS_FONT_WEIGHT_NORMAL, NS_FONT_DECORATION_NONE, 0),
|
||||
mFixedFont(nsnull, NS_FONT_STYLE_NORMAL, NS_FONT_VARIANT_NORMAL, NS_FONT_WEIGHT_NORMAL, NS_FONT_DECORATION_NONE, 0)
|
||||
{}
|
||||
|
||||
nsStyleFont::nsStyleFont(const nsFont& aVariableFont, const nsFont& aFixedFont)
|
||||
: mFont(aVariableFont),
|
||||
mFixedFont(aFixedFont)
|
||||
|
@ -46,6 +52,8 @@ struct StyleFontImpl : public nsStyleFont {
|
|||
{}
|
||||
|
||||
void ResetFrom(const nsStyleFont* aParent, nsIPresContext* aPresContext);
|
||||
void SetFrom(const nsStyleFont& aSource);
|
||||
void CopyTo(nsStyleFont& aDest) const;
|
||||
PRInt32 CalcDifference(const StyleFontImpl& aOther) const;
|
||||
static PRInt32 CalcFontDifference(const nsFont& aFont1, const nsFont& aFont2);
|
||||
|
||||
|
@ -68,6 +76,20 @@ void StyleFontImpl::ResetFrom(const nsStyleFont* aParent, nsIPresContext* aPresC
|
|||
}
|
||||
}
|
||||
|
||||
void StyleFontImpl::SetFrom(const nsStyleFont& aSource)
|
||||
{
|
||||
mFont = aSource.mFont;
|
||||
mFixedFont = aSource.mFixedFont;
|
||||
mFlags = aSource.mFlags;
|
||||
}
|
||||
|
||||
void StyleFontImpl::CopyTo(nsStyleFont& aDest) const
|
||||
{
|
||||
aDest.mFont = mFont;
|
||||
aDest.mFixedFont = mFixedFont;
|
||||
aDest.mFlags = mFlags;
|
||||
}
|
||||
|
||||
PRInt32 StyleFontImpl::CalcDifference(const StyleFontImpl& aOther) const
|
||||
{
|
||||
if (mFlags == aOther.mFlags) {
|
||||
|
@ -106,6 +128,8 @@ struct StyleColorImpl: public nsStyleColor {
|
|||
StyleColorImpl(void) { }
|
||||
|
||||
void ResetFrom(const nsStyleColor* aParent, nsIPresContext* aPresContext);
|
||||
void SetFrom(const nsStyleColor& aSource);
|
||||
void CopyTo(nsStyleColor& aDest) const;
|
||||
PRInt32 CalcDifference(const StyleColorImpl& aOther) const;
|
||||
|
||||
private: // These are not allowed
|
||||
|
@ -148,6 +172,42 @@ void StyleColorImpl::ResetFrom(const nsStyleColor* aParent, nsIPresContext* aPre
|
|||
mCursor = NS_STYLE_CURSOR_AUTO;
|
||||
}
|
||||
|
||||
void StyleColorImpl::SetFrom(const nsStyleColor& aSource)
|
||||
{
|
||||
mColor = aSource.mColor;
|
||||
|
||||
mBackgroundAttachment = aSource.mBackgroundAttachment;
|
||||
mBackgroundFlags = aSource.mBackgroundFlags;
|
||||
mBackgroundRepeat = aSource.mBackgroundRepeat;
|
||||
|
||||
mBackgroundColor = aSource.mBackgroundColor;
|
||||
mBackgroundXPosition = aSource.mBackgroundXPosition;
|
||||
mBackgroundYPosition = aSource.mBackgroundYPosition;
|
||||
mBackgroundImage = aSource.mBackgroundImage;
|
||||
|
||||
mCursor = aSource.mCursor;
|
||||
mCursorImage = aSource.mCursorImage;
|
||||
mOpacity = aSource.mOpacity;
|
||||
}
|
||||
|
||||
void StyleColorImpl::CopyTo(nsStyleColor& aDest) const
|
||||
{
|
||||
aDest.mColor = mColor;
|
||||
|
||||
aDest.mBackgroundAttachment = mBackgroundAttachment;
|
||||
aDest.mBackgroundFlags = mBackgroundFlags;
|
||||
aDest.mBackgroundRepeat = mBackgroundRepeat;
|
||||
|
||||
aDest.mBackgroundColor = mBackgroundColor;
|
||||
aDest.mBackgroundXPosition = mBackgroundXPosition;
|
||||
aDest.mBackgroundYPosition = mBackgroundYPosition;
|
||||
aDest.mBackgroundImage = mBackgroundImage;
|
||||
|
||||
aDest.mCursor = mCursor;
|
||||
aDest.mCursorImage = mCursorImage;
|
||||
aDest.mOpacity = mOpacity;
|
||||
}
|
||||
|
||||
PRInt32 StyleColorImpl::CalcDifference(const StyleColorImpl& aOther) const
|
||||
{
|
||||
if ((mColor == aOther.mColor) &&
|
||||
|
@ -461,6 +521,8 @@ struct StyleSpacingImpl: public nsStyleSpacing {
|
|||
{}
|
||||
|
||||
void ResetFrom(const nsStyleSpacing* aParent, nsIPresContext* aPresContext);
|
||||
void SetFrom(const nsStyleSpacing& aSource);
|
||||
void CopyTo(nsStyleSpacing& aDest) const;
|
||||
void RecalcData(nsIPresContext* aPresContext, nscolor color);
|
||||
PRInt32 CalcDifference(const StyleSpacingImpl& aOther) const;
|
||||
};
|
||||
|
@ -514,6 +576,16 @@ void StyleSpacingImpl::ResetFrom(const nsStyleSpacing* aParent, nsIPresContext*
|
|||
mHasCachedOutline = PR_FALSE;
|
||||
}
|
||||
|
||||
void StyleSpacingImpl::SetFrom(const nsStyleSpacing& aSource)
|
||||
{
|
||||
nsCRT::memcpy((nsStyleSpacing*)this, &aSource, sizeof(nsStyleSpacing));
|
||||
}
|
||||
|
||||
void StyleSpacingImpl::CopyTo(nsStyleSpacing& aDest) const
|
||||
{
|
||||
nsCRT::memcpy(&aDest, (const nsStyleSpacing*)this, sizeof(nsStyleSpacing));
|
||||
}
|
||||
|
||||
inline PRBool IsFixedUnit(nsStyleUnit aUnit, PRBool aEnumOK)
|
||||
{
|
||||
return PRBool((aUnit == eStyleUnit_Null) ||
|
||||
|
@ -703,6 +775,8 @@ struct StyleListImpl: public nsStyleList {
|
|||
StyleListImpl(void) { }
|
||||
|
||||
void ResetFrom(const nsStyleList* aParent, nsIPresContext* aPresContext);
|
||||
void SetFrom(const nsStyleList& aSource);
|
||||
void CopyTo(nsStyleList& aDest) const;
|
||||
PRInt32 CalcDifference(const StyleListImpl& aOther) const;
|
||||
};
|
||||
|
||||
|
@ -720,6 +794,20 @@ void StyleListImpl::ResetFrom(const nsStyleList* aParent, nsIPresContext* aPresC
|
|||
}
|
||||
}
|
||||
|
||||
void StyleListImpl::SetFrom(const nsStyleList& aSource)
|
||||
{
|
||||
mListStyleType = aSource.mListStyleType;
|
||||
mListStylePosition = aSource.mListStylePosition;
|
||||
mListStyleImage = aSource.mListStyleImage;
|
||||
}
|
||||
|
||||
void StyleListImpl::CopyTo(nsStyleList& aDest) const
|
||||
{
|
||||
aDest.mListStyleType = mListStyleType;
|
||||
aDest.mListStylePosition = mListStylePosition;
|
||||
aDest.mListStyleImage = mListStyleImage;
|
||||
}
|
||||
|
||||
PRInt32 StyleListImpl::CalcDifference(const StyleListImpl& aOther) const
|
||||
{
|
||||
if (mListStylePosition == aOther.mListStylePosition) {
|
||||
|
@ -744,6 +832,8 @@ struct StylePositionImpl: public nsStylePosition {
|
|||
StylePositionImpl(void) { }
|
||||
|
||||
void ResetFrom(const nsStylePosition* aParent, nsIPresContext* aPresContext);
|
||||
void SetFrom(const nsStylePosition& aSource);
|
||||
void CopyTo(nsStylePosition& aDest) const;
|
||||
PRInt32 CalcDifference(const StylePositionImpl& aOther) const;
|
||||
|
||||
private: // These are not allowed
|
||||
|
@ -770,6 +860,16 @@ void StylePositionImpl::ResetFrom(const nsStylePosition* aParent, nsIPresContext
|
|||
mZIndex.SetAutoValue();
|
||||
}
|
||||
|
||||
void StylePositionImpl::SetFrom(const nsStylePosition& aSource)
|
||||
{
|
||||
nsCRT::memcpy((nsStylePosition*)this, &aSource, sizeof(nsStylePosition));
|
||||
}
|
||||
|
||||
void StylePositionImpl::CopyTo(nsStylePosition& aDest) const
|
||||
{
|
||||
nsCRT::memcpy(&aDest, (const nsStylePosition*)this, sizeof(nsStylePosition));
|
||||
}
|
||||
|
||||
PRInt32 StylePositionImpl::CalcDifference(const StylePositionImpl& aOther) const
|
||||
{
|
||||
if (mPosition == aOther.mPosition) {
|
||||
|
@ -799,6 +899,8 @@ struct StyleTextImpl: public nsStyleText {
|
|||
StyleTextImpl(void) { }
|
||||
|
||||
void ResetFrom(const nsStyleText* aParent, nsIPresContext* aPresContext);
|
||||
void SetFrom(const nsStyleText& aSource);
|
||||
void CopyTo(nsStyleText& aDest) const;
|
||||
PRInt32 CalcDifference(const StyleTextImpl& aOther) const;
|
||||
};
|
||||
|
||||
|
@ -837,7 +939,16 @@ void StyleTextImpl::ResetFrom(const nsStyleText* aParent, nsIPresContext* aPresC
|
|||
mTextIndent.SetCoordValue(0);
|
||||
mWordSpacing.SetNormalValue();
|
||||
}
|
||||
}
|
||||
|
||||
void StyleTextImpl::SetFrom(const nsStyleText& aSource)
|
||||
{
|
||||
nsCRT::memcpy((nsStyleText*)this, &aSource, sizeof(nsStyleText));
|
||||
}
|
||||
|
||||
void StyleTextImpl::CopyTo(nsStyleText& aDest) const
|
||||
{
|
||||
nsCRT::memcpy(&aDest, (const nsStyleText*)this, sizeof(nsStyleText));
|
||||
}
|
||||
|
||||
PRInt32 StyleTextImpl::CalcDifference(const StyleTextImpl& aOther) const
|
||||
|
@ -868,6 +979,8 @@ struct StyleDisplayImpl: public nsStyleDisplay {
|
|||
StyleDisplayImpl(void) { }
|
||||
|
||||
void ResetFrom(const nsStyleDisplay* aParent, nsIPresContext* aPresContext);
|
||||
void SetFrom(const nsStyleDisplay& aSource);
|
||||
void CopyTo(nsStyleDisplay& aDest) const;
|
||||
PRInt32 CalcDifference(const StyleDisplayImpl& aOther) const;
|
||||
};
|
||||
|
||||
|
@ -891,6 +1004,16 @@ void StyleDisplayImpl::ResetFrom(const nsStyleDisplay* aParent, nsIPresContext*
|
|||
mClip.SizeTo(0,0,0,0);
|
||||
}
|
||||
|
||||
void StyleDisplayImpl::SetFrom(const nsStyleDisplay& aSource)
|
||||
{
|
||||
nsCRT::memcpy((nsStyleDisplay*)this, &aSource, sizeof(nsStyleDisplay));
|
||||
}
|
||||
|
||||
void StyleDisplayImpl::CopyTo(nsStyleDisplay& aDest) const
|
||||
{
|
||||
nsCRT::memcpy(&aDest, (const nsStyleDisplay*)this, sizeof(nsStyleDisplay));
|
||||
}
|
||||
|
||||
PRInt32 StyleDisplayImpl::CalcDifference(const StyleDisplayImpl& aOther) const
|
||||
{
|
||||
if ((mDisplay == aOther.mDisplay) &&
|
||||
|
@ -927,6 +1050,8 @@ struct StyleTableImpl: public nsStyleTable {
|
|||
StyleTableImpl(void);
|
||||
|
||||
void ResetFrom(const nsStyleTable* aParent, nsIPresContext* aPresContext);
|
||||
void SetFrom(const nsStyleTable& aSource);
|
||||
void CopyTo(nsStyleTable& aDest) const;
|
||||
PRInt32 CalcDifference(const StyleTableImpl& aOther) const;
|
||||
};
|
||||
|
||||
|
@ -963,6 +1088,16 @@ void StyleTableImpl::ResetFrom(const nsStyleTable* aParent, nsIPresContext* aPre
|
|||
}
|
||||
}
|
||||
|
||||
void StyleTableImpl::SetFrom(const nsStyleTable& aSource)
|
||||
{
|
||||
nsCRT::memcpy((nsStyleTable*)this, &aSource, sizeof(nsStyleTable));
|
||||
}
|
||||
|
||||
void StyleTableImpl::CopyTo(nsStyleTable& aDest) const
|
||||
{
|
||||
nsCRT::memcpy(&aDest, (const nsStyleTable*)this, sizeof(nsStyleTable));
|
||||
}
|
||||
|
||||
PRInt32 StyleTableImpl::CalcDifference(const StyleTableImpl& aOther) const
|
||||
{
|
||||
if ((mLayoutStrategy == aOther.mLayoutStrategy) &&
|
||||
|
@ -1177,6 +1312,8 @@ struct StyleContentImpl: public nsStyleContent {
|
|||
StyleContentImpl(void) : nsStyleContent() { };
|
||||
|
||||
void ResetFrom(const StyleContentImpl* aParent, nsIPresContext* aPresContext);
|
||||
void SetFrom(const nsStyleContent& aSource);
|
||||
void CopyTo(nsStyleContent& aDest) const;
|
||||
PRInt32 CalcDifference(const StyleContentImpl& aOther) const;
|
||||
};
|
||||
|
||||
|
@ -1207,6 +1344,73 @@ StyleContentImpl::ResetFrom(const StyleContentImpl* aParent, nsIPresContext* aPr
|
|||
}
|
||||
}
|
||||
|
||||
void StyleContentImpl::SetFrom(const nsStyleContent& aSource)
|
||||
{
|
||||
mMarkerOffset = aSource.mMarkerOffset;
|
||||
|
||||
PRUint32 index;
|
||||
if (NS_SUCCEEDED(AllocateContents(aSource.ContentCount()))) {
|
||||
for (index = 0; index < mContentCount; index++) {
|
||||
aSource.GetContentAt(index, mContents[index].mType, mContents[index].mContent);
|
||||
}
|
||||
}
|
||||
|
||||
if (NS_SUCCEEDED(AllocateCounterIncrements(aSource.CounterIncrementCount()))) {
|
||||
for (index = 0; index < mIncrementCount; index++) {
|
||||
aSource.GetCounterIncrementAt(index, mIncrements[index].mCounter,
|
||||
mIncrements[index].mValue);
|
||||
}
|
||||
}
|
||||
|
||||
if (NS_SUCCEEDED(AllocateCounterResets(aSource.CounterResetCount()))) {
|
||||
for (index = 0; index < mResetCount; index++) {
|
||||
aSource.GetCounterResetAt(index, mResets[index].mCounter,
|
||||
mResets[index].mValue);
|
||||
}
|
||||
}
|
||||
|
||||
if (NS_SUCCEEDED(AllocateQuotes(aSource.QuotesCount()))) {
|
||||
PRUint32 count = (mQuotesCount * 2);
|
||||
for (index = 0; index < count; index += 2) {
|
||||
aSource.GetQuotesAt(index, mQuotes[index], mQuotes[index + 1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void StyleContentImpl::CopyTo(nsStyleContent& aDest) const
|
||||
{
|
||||
aDest.mMarkerOffset = mMarkerOffset;
|
||||
|
||||
PRUint32 index;
|
||||
if (NS_SUCCEEDED(aDest.AllocateContents(mContentCount))) {
|
||||
for (index = 0; index < mContentCount; index++) {
|
||||
aDest.SetContentAt(index, mContents[index].mType,
|
||||
mContents[index].mContent);
|
||||
}
|
||||
}
|
||||
|
||||
if (NS_SUCCEEDED(aDest.AllocateCounterIncrements(mIncrementCount))) {
|
||||
for (index = 0; index < mIncrementCount; index++) {
|
||||
aDest.SetCounterIncrementAt(index, mIncrements[index].mCounter,
|
||||
mIncrements[index].mValue);
|
||||
}
|
||||
}
|
||||
|
||||
if (NS_SUCCEEDED(aDest.AllocateCounterResets(mResetCount))) {
|
||||
for (index = 0; index < mResetCount; index++) {
|
||||
aDest.SetCounterResetAt(index, mResets[index].mCounter,
|
||||
mResets[index].mValue);
|
||||
}
|
||||
}
|
||||
|
||||
if (NS_SUCCEEDED(aDest.AllocateQuotes(mQuotesCount))) {
|
||||
PRUint32 count = (mQuotesCount * 2);
|
||||
for (index = 0; index < count; index += 2) {
|
||||
aDest.SetQuotesAt(index, mQuotes[index], mQuotes[index + 1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
PRInt32
|
||||
StyleContentImpl::CalcDifference(const StyleContentImpl& aOther) const
|
||||
{
|
||||
|
@ -1259,6 +1463,8 @@ struct StyleUserInterfaceImpl: public nsStyleUserInterface {
|
|||
StyleUserInterfaceImpl(void) { }
|
||||
|
||||
void ResetFrom(const nsStyleUserInterface* aParent, nsIPresContext* aPresContext);
|
||||
void SetFrom(const nsStyleUserInterface& aSource);
|
||||
void CopyTo(nsStyleUserInterface& aDest) const;
|
||||
PRInt32 CalcDifference(const StyleUserInterfaceImpl& aOther) const;
|
||||
|
||||
private: // These are not allowed
|
||||
|
@ -1284,6 +1490,16 @@ void StyleUserInterfaceImpl::ResetFrom(const nsStyleUserInterface* aParent, nsIP
|
|||
mResizer = NS_STYLE_RESIZER_AUTO;
|
||||
}
|
||||
|
||||
void StyleUserInterfaceImpl::SetFrom(const nsStyleUserInterface& aSource)
|
||||
{
|
||||
nsCRT::memcpy((nsStyleUserInterface*)this, &aSource, sizeof(nsStyleUserInterface));
|
||||
}
|
||||
|
||||
void StyleUserInterfaceImpl::CopyTo(nsStyleUserInterface& aDest) const
|
||||
{
|
||||
nsCRT::memcpy(&aDest, (const nsStyleUserInterface*)this, sizeof(nsStyleUserInterface));
|
||||
}
|
||||
|
||||
PRInt32 StyleUserInterfaceImpl::CalcDifference(const StyleUserInterfaceImpl& aOther) const
|
||||
{
|
||||
if ((mUserInput == aOther.mUserInput) &&
|
||||
|
@ -1309,7 +1525,8 @@ PRInt32 StyleUserInterfaceImpl::CalcDifference(const StyleUserInterfaceImpl& aOt
|
|||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
class StyleContextImpl : public nsIStyleContext {
|
||||
class StyleContextImpl : public nsIStyleContext,
|
||||
protected nsIMutableStyleContext { // you can't QI to nsIMutableStyleContext
|
||||
public:
|
||||
StyleContextImpl(nsIStyleContext* aParent, nsIAtom* aPseudoTag,
|
||||
nsISupportsArray* aRules,
|
||||
|
@ -1333,6 +1550,9 @@ public:
|
|||
|
||||
NS_IMETHOD RemapStyle(nsIPresContext* aPresContext, PRBool aRecurse = PR_TRUE);
|
||||
|
||||
NS_IMETHOD GetStyle(nsStyleStructID aSID, nsStyleStruct& aStruct) const;
|
||||
NS_IMETHOD SetStyle(nsStyleStructID aSID, const nsStyleStruct& aStruct);
|
||||
|
||||
virtual const nsStyleStruct* GetStyleData(nsStyleStructID aSID);
|
||||
virtual nsStyleStruct* GetMutableStyleData(nsStyleStructID aSID);
|
||||
|
||||
|
@ -1432,7 +1652,29 @@ StyleContextImpl::~StyleContextImpl()
|
|||
NS_IF_RELEASE(mRules);
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS(StyleContextImpl, kIStyleContextIID)
|
||||
NS_IMPL_ADDREF(StyleContextImpl)
|
||||
NS_IMPL_RELEASE(StyleContextImpl)
|
||||
|
||||
NS_IMETHODIMP
|
||||
StyleContextImpl::QueryInterface(const nsIID& aIID, void** aInstancePtr)
|
||||
{
|
||||
NS_PRECONDITION(nsnull != aInstancePtr, "null pointer");
|
||||
if (nsnull == aInstancePtr) {
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
}
|
||||
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
|
||||
if (aIID.Equals(nsIStyleContext::GetIID())) {
|
||||
*aInstancePtr = (void*)(nsIStyleContext*)this;
|
||||
NS_ADDREF_THIS();
|
||||
return NS_OK;
|
||||
}
|
||||
if (aIID.Equals(kISupportsIID)) {
|
||||
*aInstancePtr = (void*) (nsISupports*)(nsIStyleContext*)this;
|
||||
NS_ADDREF_THIS();
|
||||
return NS_OK;
|
||||
}
|
||||
return NS_NOINTERFACE;
|
||||
}
|
||||
|
||||
nsIStyleContext* StyleContextImpl::GetParent(void) const
|
||||
{
|
||||
|
@ -1713,13 +1955,101 @@ nsStyleStruct* StyleContextImpl::GetMutableStyleData(nsStyleStructID aSID)
|
|||
return result;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
StyleContextImpl::GetStyle(nsStyleStructID aSID, nsStyleStruct& aStruct) const
|
||||
{
|
||||
nsresult result = NS_OK;
|
||||
switch (aSID) {
|
||||
case eStyleStruct_Font:
|
||||
mFont.CopyTo((nsStyleFont&)aStruct);
|
||||
break;
|
||||
case eStyleStruct_Color:
|
||||
mColor.CopyTo((nsStyleColor&)aStruct);
|
||||
break;
|
||||
case eStyleStruct_Spacing:
|
||||
mSpacing.CopyTo((nsStyleSpacing&)aStruct);
|
||||
break;
|
||||
case eStyleStruct_List:
|
||||
mList.CopyTo((nsStyleList&)aStruct);
|
||||
break;
|
||||
case eStyleStruct_Position:
|
||||
mPosition.CopyTo((nsStylePosition&)aStruct);
|
||||
break;
|
||||
case eStyleStruct_Text:
|
||||
mText.CopyTo((nsStyleText&)aStruct);
|
||||
break;
|
||||
case eStyleStruct_Display:
|
||||
mDisplay.CopyTo((nsStyleDisplay&)aStruct);
|
||||
break;
|
||||
case eStyleStruct_Table:
|
||||
mTable.CopyTo((nsStyleTable&)aStruct);
|
||||
break;
|
||||
case eStyleStruct_Content:
|
||||
mContent.CopyTo((nsStyleContent&)aStruct);
|
||||
break;
|
||||
case eStyleStruct_UserInterface:
|
||||
mUserInterface.CopyTo((nsStyleUserInterface&)aStruct);
|
||||
break;
|
||||
default:
|
||||
NS_ERROR("Invalid style struct id");
|
||||
result = NS_ERROR_INVALID_ARG;
|
||||
break;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
StyleContextImpl::SetStyle(nsStyleStructID aSID, const nsStyleStruct& aStruct)
|
||||
{
|
||||
nsresult result = NS_OK;
|
||||
switch (aSID) {
|
||||
case eStyleStruct_Font:
|
||||
mFont.SetFrom((const nsStyleFont&)aStruct);
|
||||
break;
|
||||
case eStyleStruct_Color:
|
||||
mColor.SetFrom((const nsStyleColor&)aStruct);
|
||||
break;
|
||||
case eStyleStruct_Spacing:
|
||||
mSpacing.SetFrom((const nsStyleSpacing&)aStruct);
|
||||
break;
|
||||
case eStyleStruct_List:
|
||||
mList.SetFrom((const nsStyleList&)aStruct);
|
||||
break;
|
||||
case eStyleStruct_Position:
|
||||
mPosition.SetFrom((const nsStylePosition&)aStruct);
|
||||
break;
|
||||
case eStyleStruct_Text:
|
||||
mText.SetFrom((const nsStyleText&)aStruct);
|
||||
break;
|
||||
case eStyleStruct_Display:
|
||||
mDisplay.SetFrom((const nsStyleDisplay&)aStruct);
|
||||
break;
|
||||
case eStyleStruct_Table:
|
||||
mTable.SetFrom((const nsStyleTable&)aStruct);
|
||||
break;
|
||||
case eStyleStruct_Content:
|
||||
mContent.SetFrom((const nsStyleContent&)aStruct);
|
||||
break;
|
||||
case eStyleStruct_UserInterface:
|
||||
mUserInterface.SetFrom((const nsStyleUserInterface&)aStruct);
|
||||
break;
|
||||
default:
|
||||
NS_ERROR("Invalid style struct id");
|
||||
result = NS_ERROR_INVALID_ARG;
|
||||
break;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
struct MapStyleData {
|
||||
MapStyleData(nsIStyleContext* aStyleContext, nsIPresContext* aPresContext)
|
||||
MapStyleData(nsIMutableStyleContext* aStyleContext, nsIPresContext* aPresContext)
|
||||
{
|
||||
mStyleContext = aStyleContext;
|
||||
mPresContext = aPresContext;
|
||||
}
|
||||
nsIStyleContext* mStyleContext;
|
||||
nsIMutableStyleContext* mStyleContext;
|
||||
nsIPresContext* mPresContext;
|
||||
};
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
class nsString;
|
||||
class nsIFrame;
|
||||
class nsIStyleRule;
|
||||
class nsIStyleContext;
|
||||
class nsIMutableStyleContext;
|
||||
class nsIPresContext;
|
||||
class nsXIFConverter;
|
||||
class nsIHTMLMappedAttributes;
|
||||
|
@ -35,7 +35,7 @@ class nsIURI;
|
|||
{0x89, 0x5c, 0x00, 0x60, 0x08, 0x91, 0x1b, 0x81} }
|
||||
|
||||
typedef void (*nsMapAttributesFunc)(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext);
|
||||
|
||||
// Abstract interface for all html content
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
#include "nsIScriptObjectOwner.h"
|
||||
#include "nsISizeOfHandler.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsIStyleRule.h"
|
||||
#include "nsISupportsArray.h"
|
||||
#include "nsIURL.h"
|
||||
|
@ -1992,7 +1993,7 @@ nsGenericHTMLElement::ParseStyleAttribute(const nsString& aValue, nsHTMLValue& a
|
|||
*/
|
||||
void
|
||||
nsGenericHTMLElement::MapCommonAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aStyleContext,
|
||||
nsIMutableStyleContext* aStyleContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
nsHTMLValue value;
|
||||
|
@ -2021,7 +2022,7 @@ nsGenericHTMLElement::GetCommonMappedAttributesImpact(const nsIAtom* aAttribute,
|
|||
|
||||
void
|
||||
nsGenericHTMLElement::MapImageAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
nsHTMLValue value;
|
||||
|
@ -2098,7 +2099,7 @@ nsGenericHTMLElement::GetImageMappedAttributesImpact(const nsIAtom* aAttribute,
|
|||
|
||||
void
|
||||
nsGenericHTMLElement::MapImageAlignAttributeInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
nsHTMLValue value;
|
||||
|
@ -2146,7 +2147,7 @@ nsGenericHTMLElement::GetImageAlignAttributeImpact(const nsIAtom* aAttribute,
|
|||
|
||||
void
|
||||
nsGenericHTMLElement::MapImageBorderAttributeInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext,
|
||||
nscolor aBorderColors[4])
|
||||
{
|
||||
|
@ -2221,7 +2222,7 @@ nsGenericHTMLElement::GetImageBorderAttributeImpact(const nsIAtom* aAttribute,
|
|||
|
||||
void
|
||||
nsGenericHTMLElement::MapBackgroundAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
nsHTMLValue value;
|
||||
|
|
|
@ -39,7 +39,7 @@ class nsIFrame;
|
|||
class nsIHTMLAttributes;
|
||||
class nsIHTMLMappedAttributes;
|
||||
class nsIHTMLContent;
|
||||
class nsIStyleContext;
|
||||
class nsIMutableStyleContext;
|
||||
class nsIStyleRule;
|
||||
class nsISupportsArray;
|
||||
class nsIDOMScriptObjectFactory;
|
||||
|
@ -247,32 +247,32 @@ public:
|
|||
*/
|
||||
|
||||
static void MapCommonAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aStyleContext,
|
||||
nsIMutableStyleContext* aStyleContext,
|
||||
nsIPresContext* aPresContext);
|
||||
static PRBool GetCommonMappedAttributesImpact(const nsIAtom* aAttribute,
|
||||
PRInt32& aHint);
|
||||
|
||||
static void MapImageAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext);
|
||||
static PRBool GetImageMappedAttributesImpact(const nsIAtom* aAttribute,
|
||||
PRInt32& aHint);
|
||||
|
||||
static void MapImageAlignAttributeInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext);
|
||||
static PRBool GetImageAlignAttributeImpact(const nsIAtom* aAttribute,
|
||||
PRInt32& aHint);
|
||||
|
||||
static void MapImageBorderAttributeInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext,
|
||||
nscolor aBorderColors[4]);
|
||||
static PRBool GetImageBorderAttributeImpact(const nsIAtom* aAttribute,
|
||||
PRInt32& aHint);
|
||||
|
||||
static void MapBackgroundAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext);
|
||||
static PRBool GetBackgroundAttributesImpact(const nsIAtom* aAttribute,
|
||||
PRInt32& aHint);
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
#include "nsINameSpaceManager.h"
|
||||
|
@ -253,7 +254,7 @@ nsHTMLAnchorElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aContext, aPresContext);
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
#include "nsIDocument.h"
|
||||
|
@ -214,7 +215,7 @@ nsHTMLAppletElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aContext, aPresContext);
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
#include "nsIFocusableContent.h"
|
||||
|
@ -187,7 +188,7 @@ nsHTMLAreaElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aContext, aPresContext);
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
#include "nsIHTMLAttributes.h"
|
||||
|
@ -163,7 +164,7 @@ nsHTMLBRElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
nsStyleDisplay* display = (nsStyleDisplay*)
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
|
||||
|
@ -146,7 +147,7 @@ nsHTMLBaseElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aContext, aPresContext);
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
|
||||
|
@ -151,7 +152,7 @@ nsHTMLBaseFontElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapFontAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
// XXX write me
|
||||
|
@ -159,7 +160,7 @@ MapFontAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aContext, aPresContext);
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
#include "nsIPresShell.h"
|
||||
|
@ -64,9 +65,9 @@ public:
|
|||
// Strength is an out-of-band weighting, always 0 here
|
||||
NS_IMETHOD GetStrength(PRInt32& aStrength) const;
|
||||
|
||||
NS_IMETHOD MapFontStyleInto(nsIStyleContext* aContext,
|
||||
NS_IMETHOD MapFontStyleInto(nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext);
|
||||
NS_IMETHOD MapStyleInto(nsIStyleContext* aContext,
|
||||
NS_IMETHOD MapStyleInto(nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext);
|
||||
|
||||
NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const;
|
||||
|
@ -90,9 +91,9 @@ public:
|
|||
// Strength is an out-of-band weighting, always maxint here
|
||||
NS_IMETHOD GetStrength(PRInt32& aStrength) const;
|
||||
|
||||
NS_IMETHOD MapFontStyleInto(nsIStyleContext* aContext,
|
||||
NS_IMETHOD MapFontStyleInto(nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext);
|
||||
NS_IMETHOD MapStyleInto(nsIStyleContext* aContext,
|
||||
NS_IMETHOD MapStyleInto(nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext);
|
||||
|
||||
NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const;
|
||||
|
@ -258,7 +259,7 @@ BodyRule::GetStrength(PRInt32& aStrength) const
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
BodyRule::MapFontStyleInto(nsIStyleContext* aContext, nsIPresContext* aPresContext)
|
||||
BodyRule::MapFontStyleInto(nsIMutableStyleContext* aContext, nsIPresContext* aPresContext)
|
||||
{
|
||||
// set up the basefont (defaults to 3)
|
||||
nsStyleFont* font = (nsStyleFont*)aContext->GetMutableStyleData(eStyleStruct_Font);
|
||||
|
@ -279,7 +280,7 @@ BodyRule::MapFontStyleInto(nsIStyleContext* aContext, nsIPresContext* aPresConte
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
BodyRule::MapStyleInto(nsIStyleContext* aContext, nsIPresContext* aPresContext)
|
||||
BodyRule::MapStyleInto(nsIMutableStyleContext* aContext, nsIPresContext* aPresContext)
|
||||
{
|
||||
if (nsnull != mPart) {
|
||||
|
||||
|
@ -456,13 +457,13 @@ BodyFixupRule::GetStrength(PRInt32& aStrength) const
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
BodyFixupRule::MapFontStyleInto(nsIStyleContext* aContext, nsIPresContext* aPresContext)
|
||||
BodyFixupRule::MapFontStyleInto(nsIMutableStyleContext* aContext, nsIPresContext* aPresContext)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
BodyFixupRule::MapStyleInto(nsIStyleContext* aContext, nsIPresContext* aPresContext)
|
||||
BodyFixupRule::MapStyleInto(nsIMutableStyleContext* aContext, nsIPresContext* aPresContext)
|
||||
{
|
||||
// XXX do any other body processing here
|
||||
|
||||
|
@ -640,7 +641,7 @@ nsHTMLBodyElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
if (nsnull != aAttributes) {
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
#include "nsIFormControl.h"
|
||||
|
@ -377,7 +378,7 @@ nsHTMLButtonElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aContext, aPresContext);
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
#include "nsIHTMLAttributes.h"
|
||||
|
@ -148,7 +149,7 @@ nsHTMLDListElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
if (nsnull != aAttributes) {
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
|
||||
|
@ -148,7 +149,7 @@ nsHTMLDelElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
// XXX write me
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
#include "nsIHTMLAttributes.h"
|
||||
|
@ -167,7 +168,7 @@ nsHTMLDirectoryElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
if (nsnull != aAttributes) {
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
#include "nsIHTMLAttributes.h"
|
||||
|
@ -172,7 +173,7 @@ nsHTMLDivElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
if (nsnull != aAttributes) {
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
|
||||
|
@ -162,7 +163,7 @@ nsHTMLEmbedElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
nsGenericHTMLElement::MapImageAlignAttributeInto(aAttributes, aContext, aPresContext);
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
#include "nsIForm.h"
|
||||
|
@ -237,7 +238,7 @@ nsHTMLFieldSetElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aContext, aPresContext);
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIDeviceContext.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsStyleUtil.h"
|
||||
#include "nsIPresContext.h"
|
||||
|
@ -191,7 +192,7 @@ nsHTMLFontElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapFontAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
if (nsnull != aAttributes) {
|
||||
|
@ -303,7 +304,7 @@ MapFontAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
if (nsnull != aAttributes) {
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
#include "nsIDocument.h"
|
||||
|
@ -401,7 +402,7 @@ nsHTMLFormElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
// XXX write me
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
|
||||
|
@ -204,7 +205,7 @@ nsHTMLFrameElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aContext, aPresContext);
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
|
||||
|
@ -167,7 +168,7 @@ nsHTMLFrameSetElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aContext, aPresContext);
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
#include "nsIHTMLAttributes.h"
|
||||
|
@ -211,7 +212,7 @@ nsHTMLHRElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
if (nsnull != aAttributes) {
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
|
||||
|
@ -143,7 +144,7 @@ nsHTMLHeadElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aContext, aPresContext);
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
#include "nsIHTMLAttributes.h"
|
||||
|
@ -155,7 +156,7 @@ nsHTMLHeadingElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
if (nsnull != aAttributes) {
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
#include "nsIDocument.h"
|
||||
|
@ -149,7 +150,7 @@ nsHTMLHtmlElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aContext, aPresContext);
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
#include "nsIHTMLAttributes.h"
|
||||
|
@ -231,7 +232,7 @@ nsHTMLIFrameElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
if (nsnull != aAttributes) {
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
#include "nsIPresShell.h"
|
||||
|
@ -257,7 +258,7 @@ nsHTMLImageElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
if (nsnull != aAttributes) {
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
#include "nsIHTMLAttributes.h"
|
||||
|
@ -729,7 +730,7 @@ nsHTMLInputElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
nsHTMLValue value;
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
|
||||
|
@ -148,7 +149,7 @@ nsHTMLInsElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
// XXX write me
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
|
||||
|
@ -154,7 +155,7 @@ nsHTMLIsIndexElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
// XXX write me
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
#include "nsIHTMLAttributes.h"
|
||||
|
@ -177,7 +178,7 @@ nsHTMLLIElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
if (nsnull != aAttributes) {
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
#include "nsIFormControl.h"
|
||||
|
@ -261,7 +262,7 @@ nsHTMLLabelElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aContext, aPresContext);
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
#include "nsIForm.h"
|
||||
|
@ -193,7 +194,7 @@ nsHTMLLegendElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aContext, aPresContext);
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
#include "nsIDOMStyleSheet.h"
|
||||
|
@ -244,7 +245,7 @@ nsHTMLLinkElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aContext, aPresContext);
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
#include "GenericElementCollection.h"
|
||||
|
@ -313,7 +314,7 @@ nsHTMLMapElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aContext,
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
#include "nsIHTMLAttributes.h"
|
||||
|
@ -163,7 +164,7 @@ nsHTMLMenuElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
if (nsnull != aAttributes) {
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
|
||||
|
@ -153,7 +154,7 @@ nsHTMLMetaElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aContext, aPresContext);
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
|
||||
|
@ -148,7 +149,7 @@ nsHTMLModElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
// XXX write me
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
#include "nsIHTMLAttributes.h"
|
||||
|
@ -204,7 +205,7 @@ nsHTMLOListElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
if (nsnull != aAttributes) {
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
|
||||
|
@ -218,7 +219,7 @@ nsHTMLObjectElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
nsGenericHTMLElement::MapImageAlignAttributeInto(aAttributes, aContext, aPresContext);
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
|
||||
|
@ -148,7 +149,7 @@ nsHTMLOptGroupElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
// XXX write me
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
#include "nsIFormControl.h"
|
||||
|
@ -388,7 +389,7 @@ nsHTMLOptionElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aContext, aPresContext);
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
#include "nsIHTMLAttributes.h"
|
||||
|
@ -162,7 +163,7 @@ nsHTMLParagraphElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
if (nsnull != aAttributes) {
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
|
||||
|
@ -154,7 +155,7 @@ nsHTMLParamElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
// XXX write me
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
#include "nsIHTMLAttributes.h"
|
||||
|
@ -166,7 +167,7 @@ nsHTMLPreElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapFontAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
if (nsnull != aAttributes) {
|
||||
|
@ -184,7 +185,7 @@ MapFontAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
if (nsnull != aAttributes) {
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
|
||||
|
@ -145,7 +146,7 @@ nsHTMLQuoteElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
// XXX write me
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
|
||||
|
@ -207,7 +208,7 @@ nsHTMLScriptElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aContext, aPresContext);
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
#include "nsIHTMLAttributes.h"
|
||||
|
@ -725,7 +726,7 @@ nsHTMLSelectElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
nsHTMLValue value;
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
|
||||
|
@ -218,7 +219,7 @@ nsHTMLObjectElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
nsGenericHTMLElement::MapImageAlignAttributeInto(aAttributes, aContext, aPresContext);
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
#include "nsIHTMLAttributes.h"
|
||||
|
@ -165,7 +166,7 @@ nsHTMLSpacerElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
if (nsnull != aAttributes) {
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
|
||||
|
@ -131,7 +132,7 @@ nsHTMLSpanElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
// XXX write me
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
#include "nsIDOMStyleSheet.h"
|
||||
|
@ -228,7 +229,7 @@ nsHTMLStyleElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aContext, aPresContext);
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
#include "nsIHTMLAttributes.h"
|
||||
|
@ -163,7 +164,7 @@ nsHTMLTableCaptionElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
if (nsnull != aAttributes) {
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
|
||||
|
@ -427,7 +428,7 @@ nsHTMLTableCellElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
NS_PRECONDITION(nsnull!=aContext, "bad style context arg");
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
|
||||
|
@ -225,7 +226,7 @@ nsHTMLTableColElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
NS_PRECONDITION(nsnull!=aContext, "bad style context arg");
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
|
||||
|
@ -214,7 +215,7 @@ nsHTMLTableColGroupElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
NS_PRECONDITION(nsnull!=aContext, "bad style context arg");
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
#include "nsHTMLParts.h"
|
||||
|
@ -953,7 +954,7 @@ nsHTMLTableElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapTableFrameInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext,
|
||||
nsStyleSpacing* aSpacing,
|
||||
PRUint8 aBorderStyle)
|
||||
|
@ -1015,7 +1016,7 @@ MapTableFrameInto(const nsIHTMLMappedAttributes* aAttributes,
|
|||
|
||||
static void
|
||||
MapTableBorderInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext,
|
||||
PRUint8 aBorderStyle)
|
||||
{
|
||||
|
@ -1073,7 +1074,7 @@ MapTableBorderInto(const nsIHTMLMappedAttributes* aAttributes,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
NS_PRECONDITION(nsnull!=aContext, "bad style context arg");
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
#include "nsHTMLParts.h"
|
||||
|
@ -651,7 +652,7 @@ nsHTMLTableRowElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
NS_PRECONDITION(nsnull!=aContext, "bad style context arg");
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include "nsHTMLIIDs.h"
|
||||
#include "nsHTMLParts.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
#include "GenericElementCollection.h"
|
||||
|
@ -284,7 +285,7 @@ nsHTMLTableSectionElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
NS_PRECONDITION(nsnull!=aContext, "bad style context arg");
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
#include "nsIHTMLAttributes.h"
|
||||
|
@ -396,7 +397,7 @@ nsHTMLTextAreaElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
nsHTMLValue value;
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
#include "nsXIFConverter.h"
|
||||
|
@ -147,7 +148,7 @@ nsHTMLTitleElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aContext, aPresContext);
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
#include "nsIHTMLAttributes.h"
|
||||
|
@ -182,7 +183,7 @@ nsHTMLUListElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
if (nsnull != aAttributes) {
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
|
||||
|
@ -141,7 +142,7 @@ nsHTMLWBRElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aContext, aPresContext);
|
||||
|
|
|
@ -100,13 +100,13 @@ nsCSSRule::GetStrength(PRInt32& aStrength) const
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsCSSRule::MapFontStyleInto(nsIStyleContext* aContext, nsIPresContext* aPresContext)
|
||||
nsCSSRule::MapFontStyleInto(nsIMutableStyleContext* aContext, nsIPresContext* aPresContext)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsCSSRule::MapStyleInto(nsIStyleContext* aContext, nsIPresContext* aPresContext)
|
||||
nsCSSRule::MapStyleInto(nsIMutableStyleContext* aContext, nsIPresContext* aPresContext)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
class nsIArena;
|
||||
class nsIStyleSheet;
|
||||
class nsICSSStyleSheet;
|
||||
class nsIStyleContext;
|
||||
class nsIMutableStyleContext;
|
||||
class nsIPresContext;
|
||||
|
||||
class nsCSSRule {
|
||||
|
@ -45,8 +45,8 @@ public:
|
|||
// nsIStyleRule methods
|
||||
NS_IMETHOD GetStrength(PRInt32& aStrength) const;
|
||||
|
||||
NS_IMETHOD MapFontStyleInto(nsIStyleContext* aContext, nsIPresContext* aPresContext);
|
||||
NS_IMETHOD MapStyleInto(nsIStyleContext* aContext, nsIPresContext* aPresContext);
|
||||
NS_IMETHOD MapFontStyleInto(nsIMutableStyleContext* aContext, nsIPresContext* aPresContext);
|
||||
NS_IMETHOD MapStyleInto(nsIMutableStyleContext* aContext, nsIPresContext* aPresContext);
|
||||
|
||||
protected:
|
||||
PRUint32 mInHeap : 1;
|
||||
|
|
|
@ -42,21 +42,21 @@ static NS_DEFINE_IID(kICSSNameSpaceRuleIID, NS_ICSS_NAMESPACE_RULE_IID);
|
|||
NS_IMETHOD GetStyleSheet(nsIStyleSheet*& aSheet) const; \
|
||||
NS_IMETHOD SetStyleSheet(nsICSSStyleSheet* aSheet); \
|
||||
NS_IMETHOD GetStrength(PRInt32& aStrength) const; \
|
||||
NS_IMETHOD MapFontStyleInto(nsIStyleContext* aContext, nsIPresContext* aPresContext); \
|
||||
NS_IMETHOD MapStyleInto(nsIStyleContext* aContext, nsIPresContext* aPresContext); \
|
||||
NS_IMETHOD MapFontStyleInto(nsIMutableStyleContext* aContext, nsIPresContext* aPresContext); \
|
||||
NS_IMETHOD MapStyleInto(nsIMutableStyleContext* aContext, nsIPresContext* aPresContext); \
|
||||
|
||||
#define IMPL_STYLE_RULE_INHERIT(_class, super) \
|
||||
NS_IMETHODIMP _class::GetStyleSheet(nsIStyleSheet*& aSheet) const { return super::GetStyleSheet(aSheet); } \
|
||||
NS_IMETHODIMP _class::SetStyleSheet(nsICSSStyleSheet* aSheet) { return super::SetStyleSheet(aSheet); } \
|
||||
NS_IMETHODIMP _class::GetStrength(PRInt32& aStrength) const { return super::GetStrength(aStrength); } \
|
||||
NS_IMETHODIMP _class::MapFontStyleInto(nsIStyleContext* aContext, nsIPresContext* aPresContext) { return NS_OK; } \
|
||||
NS_IMETHODIMP _class::MapStyleInto(nsIStyleContext* aContext, nsIPresContext* aPresContext) { return NS_OK; }
|
||||
NS_IMETHODIMP _class::MapFontStyleInto(nsIMutableStyleContext* aContext, nsIPresContext* aPresContext) { return NS_OK; } \
|
||||
NS_IMETHODIMP _class::MapStyleInto(nsIMutableStyleContext* aContext, nsIPresContext* aPresContext) { return NS_OK; }
|
||||
|
||||
#define IMPL_STYLE_RULE_INHERIT2(_class, super) \
|
||||
NS_IMETHODIMP _class::GetStyleSheet(nsIStyleSheet*& aSheet) const { return super::GetStyleSheet(aSheet); } \
|
||||
NS_IMETHODIMP _class::GetStrength(PRInt32& aStrength) const { return super::GetStrength(aStrength); } \
|
||||
NS_IMETHODIMP _class::MapFontStyleInto(nsIStyleContext* aContext, nsIPresContext* aPresContext) { return NS_OK; } \
|
||||
NS_IMETHODIMP _class::MapStyleInto(nsIStyleContext* aContext, nsIPresContext* aPresContext) { return NS_OK; }
|
||||
NS_IMETHODIMP _class::MapFontStyleInto(nsIMutableStyleContext* aContext, nsIPresContext* aPresContext) { return NS_OK; } \
|
||||
NS_IMETHODIMP _class::MapStyleInto(nsIMutableStyleContext* aContext, nsIPresContext* aPresContext) { return NS_OK; }
|
||||
|
||||
// -------------------------------------------
|
||||
// nsICSSCharsetRule
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include "nsIHTMLContentContainer.h"
|
||||
#include "nsIURL.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsIPresContext.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIDeviceContext.h"
|
||||
|
@ -432,10 +433,11 @@ static PRBool SetCoord(const nsCSSValue& aValue, nsStyleCoord& aCoord,
|
|||
nsIPresContext* aPresContext);
|
||||
|
||||
static void MapDeclarationFontInto(nsICSSDeclaration* aDeclaration,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext);
|
||||
static void MapDeclarationInto(nsICSSDeclaration* aDeclaration,
|
||||
nsIStyleContext* aContext, nsIPresContext* aPresContext);
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext);
|
||||
|
||||
|
||||
class CSSStyleRuleImpl;
|
||||
|
@ -454,8 +456,8 @@ public:
|
|||
// Strength is an out-of-band weighting, useful for mapping CSS ! important
|
||||
NS_IMETHOD GetStrength(PRInt32& aStrength) const;
|
||||
|
||||
NS_IMETHOD MapFontStyleInto(nsIStyleContext* aContext, nsIPresContext* aPresContext);
|
||||
NS_IMETHOD MapStyleInto(nsIStyleContext* aContext, nsIPresContext* aPresContext);
|
||||
NS_IMETHOD MapFontStyleInto(nsIMutableStyleContext* aContext, nsIPresContext* aPresContext);
|
||||
NS_IMETHOD MapStyleInto(nsIMutableStyleContext* aContext, nsIPresContext* aPresContext);
|
||||
|
||||
NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const;
|
||||
|
||||
|
@ -516,14 +518,14 @@ CSSImportantRule::GetStrength(PRInt32& aStrength) const
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
CSSImportantRule::MapFontStyleInto(nsIStyleContext* aContext, nsIPresContext* aPresContext)
|
||||
CSSImportantRule::MapFontStyleInto(nsIMutableStyleContext* aContext, nsIPresContext* aPresContext)
|
||||
{
|
||||
MapDeclarationFontInto(mDeclaration, aContext, aPresContext);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
CSSImportantRule::MapStyleInto(nsIStyleContext* aContext, nsIPresContext* aPresContext)
|
||||
CSSImportantRule::MapStyleInto(nsIMutableStyleContext* aContext, nsIPresContext* aPresContext)
|
||||
{
|
||||
MapDeclarationInto(mDeclaration, aContext, aPresContext);
|
||||
return NS_OK;
|
||||
|
@ -716,8 +718,8 @@ public:
|
|||
NS_IMETHOD GetType(PRInt32& aType) const;
|
||||
NS_IMETHOD Clone(nsICSSRule*& aClone) const;
|
||||
|
||||
NS_IMETHOD MapFontStyleInto(nsIStyleContext* aContext, nsIPresContext* aPresContext);
|
||||
NS_IMETHOD MapStyleInto(nsIStyleContext* aContext, nsIPresContext* aPresContext);
|
||||
NS_IMETHOD MapFontStyleInto(nsIMutableStyleContext* aContext, nsIPresContext* aPresContext);
|
||||
NS_IMETHOD MapStyleInto(nsIMutableStyleContext* aContext, nsIPresContext* aPresContext);
|
||||
|
||||
NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const;
|
||||
|
||||
|
@ -1215,14 +1217,14 @@ CSSStyleRuleImpl::Clone(nsICSSRule*& aClone) const
|
|||
|
||||
|
||||
NS_IMETHODIMP
|
||||
CSSStyleRuleImpl::MapFontStyleInto(nsIStyleContext* aContext, nsIPresContext* aPresContext)
|
||||
CSSStyleRuleImpl::MapFontStyleInto(nsIMutableStyleContext* aContext, nsIPresContext* aPresContext)
|
||||
{
|
||||
MapDeclarationFontInto(mDeclaration, aContext, aPresContext);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
CSSStyleRuleImpl::MapStyleInto(nsIStyleContext* aContext, nsIPresContext* aPresContext)
|
||||
CSSStyleRuleImpl::MapStyleInto(nsIMutableStyleContext* aContext, nsIPresContext* aPresContext)
|
||||
{
|
||||
MapDeclarationInto(mDeclaration, aContext, aPresContext);
|
||||
return NS_OK;
|
||||
|
@ -1245,7 +1247,7 @@ nsString& Unquote(nsString& aString)
|
|||
|
||||
static void
|
||||
MapDeclarationFontInto(nsICSSDeclaration* aDeclaration,
|
||||
nsIStyleContext* aContext, nsIPresContext* aPresContext)
|
||||
nsIMutableStyleContext* aContext, nsIPresContext* aPresContext)
|
||||
{
|
||||
if (nsnull != aDeclaration) {
|
||||
nsIStyleContext* parentContext = aContext->GetParent();
|
||||
|
@ -1404,7 +1406,7 @@ MapDeclarationFontInto(nsICSSDeclaration* aDeclaration,
|
|||
|
||||
static void
|
||||
MapDeclarationTextInto(nsICSSDeclaration* aDeclaration,
|
||||
nsIStyleContext* aContext, nsIStyleContext* aParentContext,
|
||||
nsIMutableStyleContext* aContext, nsIStyleContext* aParentContext,
|
||||
nsStyleFont* aFont, nsIPresContext* aPresContext)
|
||||
{
|
||||
const nsStyleFont* parentFont = aFont;
|
||||
|
@ -1499,7 +1501,7 @@ MapDeclarationTextInto(nsICSSDeclaration* aDeclaration,
|
|||
|
||||
static void
|
||||
MapDeclarationDisplayInto(nsICSSDeclaration* aDeclaration,
|
||||
nsIStyleContext* aContext, nsIStyleContext* aParentContext,
|
||||
nsIMutableStyleContext* aContext, nsIStyleContext* aParentContext,
|
||||
nsStyleFont* aFont, nsIPresContext* aPresContext)
|
||||
{
|
||||
nsCSSDisplay* ourDisplay;
|
||||
|
@ -1631,7 +1633,7 @@ MapDeclarationDisplayInto(nsICSSDeclaration* aDeclaration,
|
|||
|
||||
static void
|
||||
MapDeclarationColorInto(nsICSSDeclaration* aDeclaration,
|
||||
nsIStyleContext* aContext, nsIStyleContext* aParentContext,
|
||||
nsIMutableStyleContext* aContext, nsIStyleContext* aParentContext,
|
||||
nsStyleFont* aFont, nsIPresContext* aPresContext)
|
||||
{
|
||||
nsCSSColor* ourColor;
|
||||
|
@ -1780,7 +1782,7 @@ MapDeclarationColorInto(nsICSSDeclaration* aDeclaration,
|
|||
|
||||
static void
|
||||
MapDeclarationMarginInto(nsICSSDeclaration* aDeclaration,
|
||||
nsIStyleContext* aContext, nsIStyleContext* aParentContext,
|
||||
nsIMutableStyleContext* aContext, nsIStyleContext* aParentContext,
|
||||
nsStyleFont* aFont, nsIPresContext* aPresContext)
|
||||
{
|
||||
nsCSSMargin* ourMargin;
|
||||
|
@ -2034,7 +2036,7 @@ MapDeclarationMarginInto(nsICSSDeclaration* aDeclaration,
|
|||
|
||||
static void
|
||||
MapDeclarationPositionInto(nsICSSDeclaration* aDeclaration,
|
||||
nsIStyleContext* aContext, nsIStyleContext* aParentContext,
|
||||
nsIMutableStyleContext* aContext, nsIStyleContext* aParentContext,
|
||||
nsStyleFont* aFont, nsIPresContext* aPresContext)
|
||||
{
|
||||
nsCSSPosition* ourPosition;
|
||||
|
@ -2121,7 +2123,7 @@ MapDeclarationPositionInto(nsICSSDeclaration* aDeclaration,
|
|||
|
||||
static void
|
||||
MapDeclarationListInto(nsICSSDeclaration* aDeclaration,
|
||||
nsIStyleContext* aContext, nsIStyleContext* aParentContext,
|
||||
nsIMutableStyleContext* aContext, nsIStyleContext* aParentContext,
|
||||
nsStyleFont* /*aFont*/, nsIPresContext* aPresContext)
|
||||
{
|
||||
nsCSSList* ourList;
|
||||
|
@ -2169,7 +2171,7 @@ MapDeclarationListInto(nsICSSDeclaration* aDeclaration,
|
|||
|
||||
static void
|
||||
MapDeclarationTableInto(nsICSSDeclaration* aDeclaration,
|
||||
nsIStyleContext* aContext, nsIStyleContext* aParentContext,
|
||||
nsIMutableStyleContext* aContext, nsIStyleContext* aParentContext,
|
||||
nsStyleFont* aFont, nsIPresContext* aPresContext)
|
||||
{
|
||||
nsCSSTable* ourTable;
|
||||
|
@ -2238,7 +2240,7 @@ MapDeclarationTableInto(nsICSSDeclaration* aDeclaration,
|
|||
|
||||
static void
|
||||
MapDeclarationContentInto(nsICSSDeclaration* aDeclaration,
|
||||
nsIStyleContext* aContext, nsIStyleContext* aParentContext,
|
||||
nsIMutableStyleContext* aContext, nsIStyleContext* aParentContext,
|
||||
nsStyleFont* aFont, nsIPresContext* aPresContext)
|
||||
{
|
||||
nsCSSContent* ourContent;
|
||||
|
@ -2445,7 +2447,7 @@ MapDeclarationContentInto(nsICSSDeclaration* aDeclaration,
|
|||
|
||||
static void
|
||||
MapDeclarationUIInto(nsICSSDeclaration* aDeclaration,
|
||||
nsIStyleContext* aContext, nsIStyleContext* aParentContext,
|
||||
nsIMutableStyleContext* aContext, nsIStyleContext* aParentContext,
|
||||
nsStyleFont* /*aFont*/, nsIPresContext* aPresContext)
|
||||
{
|
||||
nsCSSUserInterface* ourUI;
|
||||
|
@ -2539,7 +2541,7 @@ MapDeclarationUIInto(nsICSSDeclaration* aDeclaration,
|
|||
}
|
||||
|
||||
void MapDeclarationInto(nsICSSDeclaration* aDeclaration,
|
||||
nsIStyleContext* aContext, nsIPresContext* aPresContext)
|
||||
nsIMutableStyleContext* aContext, nsIPresContext* aPresContext)
|
||||
{
|
||||
if (nsnull != aDeclaration) {
|
||||
nsIStyleContext* parentContext = aContext->GetParent();
|
||||
|
|
|
@ -308,8 +308,8 @@ public:
|
|||
NS_IMETHOD SetStyleSheet(nsIHTMLStyleSheet* aSheet);
|
||||
// Strength is an out-of-band weighting, always 0 here
|
||||
NS_IMETHOD GetStrength(PRInt32& aStrength) const;
|
||||
NS_IMETHOD MapFontStyleInto(nsIStyleContext* aContext, nsIPresContext* aPresContext);
|
||||
NS_IMETHOD MapStyleInto(nsIStyleContext* aContext, nsIPresContext* aPresContext);
|
||||
NS_IMETHOD MapFontStyleInto(nsIMutableStyleContext* aContext, nsIPresContext* aPresContext);
|
||||
NS_IMETHOD MapStyleInto(nsIMutableStyleContext* aContext, nsIPresContext* aPresContext);
|
||||
|
||||
NS_IMETHOD List(FILE* out, PRInt32 aIndent) const;
|
||||
|
||||
|
@ -715,7 +715,7 @@ nsHTMLMappedAttributes::GetStrength(PRInt32& aStrength) const
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLMappedAttributes::MapFontStyleInto(nsIStyleContext* aContext, nsIPresContext* aPresContext)
|
||||
nsHTMLMappedAttributes::MapFontStyleInto(nsIMutableStyleContext* aContext, nsIPresContext* aPresContext)
|
||||
{
|
||||
if (0 < mAttrCount) {
|
||||
if (mFontMapper) {
|
||||
|
@ -726,7 +726,7 @@ nsHTMLMappedAttributes::MapFontStyleInto(nsIStyleContext* aContext, nsIPresConte
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLMappedAttributes::MapStyleInto(nsIStyleContext* aContext, nsIPresContext* aPresContext)
|
||||
nsHTMLMappedAttributes::MapStyleInto(nsIMutableStyleContext* aContext, nsIPresContext* aPresContext)
|
||||
{
|
||||
if (0 < mAttrCount) {
|
||||
NS_ASSERTION(mMapper || mFontMapper, "no mapping function");
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#include "nsICSSStyleRule.h"
|
||||
#include "nsIStyleRuleProcessor.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsIPresContext.h"
|
||||
#include "nsIDocument.h"
|
||||
|
||||
|
@ -49,9 +50,9 @@ public:
|
|||
NS_IMETHOD HashValue(PRUint32& aValue) const;
|
||||
NS_IMETHOD GetStyleSheet(nsIStyleSheet*& aSheet) const;
|
||||
NS_IMETHOD GetStrength(PRInt32& aStrength) const;
|
||||
NS_IMETHOD MapStyleInto(nsIStyleContext* aContext,
|
||||
NS_IMETHOD MapStyleInto(nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext);
|
||||
NS_IMETHOD MapFontStyleInto(nsIStyleContext* aContext,
|
||||
NS_IMETHOD MapFontStyleInto(nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext);
|
||||
NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const;
|
||||
|
||||
|
@ -101,7 +102,7 @@ CSSFirstLineRule::GetStrength(PRInt32& aStrength) const
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
CSSFirstLineRule::MapFontStyleInto(nsIStyleContext* aContext,
|
||||
CSSFirstLineRule::MapFontStyleInto(nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
return NS_OK;
|
||||
|
@ -117,7 +118,7 @@ CSSFirstLineRule::MapFontStyleInto(nsIStyleContext* aContext,
|
|||
//
|
||||
// Everything else doesn't apply.
|
||||
NS_IMETHODIMP
|
||||
CSSFirstLineRule::MapStyleInto(nsIStyleContext* aContext,
|
||||
CSSFirstLineRule::MapStyleInto(nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
nsIStyleContext* parentContext;
|
||||
|
@ -188,7 +189,7 @@ class CSSFirstLetterRule : public CSSFirstLineRule {
|
|||
public:
|
||||
CSSFirstLetterRule(nsIHTMLCSSStyleSheet* aSheet);
|
||||
|
||||
NS_IMETHOD MapStyleInto(nsIStyleContext* aContext,
|
||||
NS_IMETHOD MapStyleInto(nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext);
|
||||
};
|
||||
|
||||
|
@ -208,7 +209,7 @@ CSSFirstLetterRule::CSSFirstLetterRule(nsIHTMLCSSStyleSheet* aSheet)
|
|||
//
|
||||
// Everything else doesn't apply.
|
||||
NS_IMETHODIMP
|
||||
CSSFirstLetterRule::MapStyleInto(nsIStyleContext* aContext,
|
||||
CSSFirstLetterRule::MapStyleInto(nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
nsIStyleContext* parentContext;
|
||||
|
|
|
@ -36,6 +36,7 @@ static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
|
|||
#include "nsIStyleRule.h"
|
||||
#include "nsIFrame.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsHTMLAtoms.h"
|
||||
#include "nsIPresContext.h"
|
||||
#include "nsILinkHandler.h"
|
||||
|
@ -68,8 +69,8 @@ public:
|
|||
// Strength is an out-of-band weighting, always 0 here
|
||||
NS_IMETHOD GetStrength(PRInt32& aStrength) const;
|
||||
|
||||
NS_IMETHOD MapFontStyleInto(nsIStyleContext* aContext, nsIPresContext* aPresContext);
|
||||
NS_IMETHOD MapStyleInto(nsIStyleContext* aContext, nsIPresContext* aPresContext);
|
||||
NS_IMETHOD MapFontStyleInto(nsIMutableStyleContext* aContext, nsIPresContext* aPresContext);
|
||||
NS_IMETHOD MapStyleInto(nsIMutableStyleContext* aContext, nsIPresContext* aPresContext);
|
||||
|
||||
NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const;
|
||||
|
||||
|
@ -82,7 +83,7 @@ public:
|
|||
HTMLDocumentColorRule(nsIHTMLStyleSheet* aSheet);
|
||||
virtual ~HTMLDocumentColorRule();
|
||||
|
||||
NS_IMETHOD MapStyleInto(nsIStyleContext* aContext, nsIPresContext* aPresContext);
|
||||
NS_IMETHOD MapStyleInto(nsIMutableStyleContext* aContext, nsIPresContext* aPresContext);
|
||||
|
||||
nscolor mBackgroundColor;
|
||||
PRBool mForegroundSet;
|
||||
|
@ -132,13 +133,13 @@ HTMLColorRule::GetStrength(PRInt32& aStrength) const
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLColorRule::MapFontStyleInto(nsIStyleContext* aContext, nsIPresContext* aPresContext)
|
||||
HTMLColorRule::MapFontStyleInto(nsIMutableStyleContext* aContext, nsIPresContext* aPresContext)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLColorRule::MapStyleInto(nsIStyleContext* aContext, nsIPresContext* aPresContext)
|
||||
HTMLColorRule::MapStyleInto(nsIMutableStyleContext* aContext, nsIPresContext* aPresContext)
|
||||
{
|
||||
nsStyleColor* styleColor = (nsStyleColor*)(aContext->GetMutableStyleData(eStyleStruct_Color));
|
||||
|
||||
|
@ -166,7 +167,7 @@ HTMLDocumentColorRule::~HTMLDocumentColorRule()
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLDocumentColorRule::MapStyleInto(nsIStyleContext* aContext, nsIPresContext* aPresContext)
|
||||
HTMLDocumentColorRule::MapStyleInto(nsIMutableStyleContext* aContext, nsIPresContext* aPresContext)
|
||||
{
|
||||
nsStyleColor* styleColor = (nsStyleColor*)(aContext->GetMutableStyleData(eStyleStruct_Color));
|
||||
|
||||
|
@ -199,9 +200,9 @@ public:
|
|||
// Strength is an out-of-band weighting, always 0 here
|
||||
NS_IMETHOD GetStrength(PRInt32& aStrength) const;
|
||||
|
||||
NS_IMETHOD MapFontStyleInto(nsIStyleContext* aContext,
|
||||
NS_IMETHOD MapFontStyleInto(nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext);
|
||||
NS_IMETHOD MapStyleInto(nsIStyleContext* aContext,
|
||||
NS_IMETHOD MapStyleInto(nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext);
|
||||
|
||||
NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const;
|
||||
|
@ -252,13 +253,13 @@ TableBackgroundRule::GetStrength(PRInt32& aStrength) const
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
TableBackgroundRule::MapFontStyleInto(nsIStyleContext* aContext, nsIPresContext* aPresContext)
|
||||
TableBackgroundRule::MapFontStyleInto(nsIMutableStyleContext* aContext, nsIPresContext* aPresContext)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
TableBackgroundRule::MapStyleInto(nsIStyleContext* aContext, nsIPresContext* aPresContext)
|
||||
TableBackgroundRule::MapStyleInto(nsIMutableStyleContext* aContext, nsIPresContext* aPresContext)
|
||||
{
|
||||
nsIStyleContext* parentContext = aContext->GetParent();
|
||||
|
||||
|
|
|
@ -36,6 +36,7 @@ nsStyleStruct.h
|
|||
nsStyleConsts.h
|
||||
nsIStyledContent.h
|
||||
nsIStyleContext.h
|
||||
nsIMutableStyleContext.h
|
||||
nsIStyleRule.h
|
||||
nsIStyleSet.h
|
||||
nsIStyleSheet.h
|
||||
|
|
|
@ -52,6 +52,7 @@ nsIFrameSelection.h \
|
|||
nsISpaceManager.h \
|
||||
nsIStyledContent.h \
|
||||
nsIStyleContext.h \
|
||||
nsIMutableStyleContext.h \
|
||||
nsIStyleFrameConstruction.h \
|
||||
nsIStyleRule.h \
|
||||
nsIStyleSet.h \
|
||||
|
|
|
@ -45,6 +45,7 @@ EXPORTS = \
|
|||
nsISpaceManager.h \
|
||||
nsIStyledContent.h \
|
||||
nsIStyleContext.h \
|
||||
nsIMutableStyleContext.h \
|
||||
nsIStyleFrameConstruction.h \
|
||||
nsIStyleRule.h \
|
||||
nsIStyleSet.h \
|
||||
|
|
|
@ -0,0 +1,49 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
#ifndef nsIMutableStyleContext_h___
|
||||
#define nsIMutableStyleContext_h___
|
||||
|
||||
#include "nslayout.h"
|
||||
#include "nsISupports.h"
|
||||
#include "nsStyleStruct.h"
|
||||
|
||||
|
||||
#define NS_IMUTABLESTYLECONTEXT_IID \
|
||||
{ 0x53cbb100, 0x8340, 0x11d3, \
|
||||
{0xba, 0x05, 0x00, 0x10, 0x83, 0x02, 0x3c, 0x2b} }
|
||||
|
||||
|
||||
class nsIMutableStyleContext : public nsISupports {
|
||||
public:
|
||||
static const nsIID& GetIID() { static nsIID iid = NS_IMUTABLESTYLECONTEXT_IID; return iid; }
|
||||
|
||||
virtual nsIStyleContext* GetParent(void) const = 0;
|
||||
|
||||
// Fill a style struct with data
|
||||
NS_IMETHOD GetStyle(nsStyleStructID aSID, nsStyleStruct& aStruct) const = 0;
|
||||
NS_IMETHOD SetStyle(nsStyleStructID aSID, const nsStyleStruct& aStruct) = 0;
|
||||
|
||||
//------------------------------------------------
|
||||
// TEMP methods these are here only to ease the transition
|
||||
// to the newer Get/SetStyle APIs above. Don't call these.
|
||||
// get a style data struct by ID
|
||||
virtual const nsStyleStruct* GetStyleData(nsStyleStructID aSID) = 0;
|
||||
virtual nsStyleStruct* GetMutableStyleData(nsStyleStructID aSID) = 0;
|
||||
};
|
||||
|
||||
#endif /* nsIMutableStyleContext_h___ */
|
|
@ -37,6 +37,9 @@ class nsISupportsArray;
|
|||
// The lifetime of these objects is managed by the nsIStyleContext.
|
||||
|
||||
struct nsStyleFont : public nsStyleStruct {
|
||||
nsStyleFont(void);
|
||||
~nsStyleFont(void);
|
||||
|
||||
nsFont mFont; // [inherited]
|
||||
nsFont mFixedFont; // [inherited]
|
||||
PRUint8 mFlags; // [inherited] See nsStyleConsts.h
|
||||
|
@ -44,10 +47,12 @@ struct nsStyleFont : public nsStyleStruct {
|
|||
protected:
|
||||
nsStyleFont(const nsFont& aVariableFont, const nsFont& aFixedFont);
|
||||
nsStyleFont(nsIPresContext& aPresContext);
|
||||
~nsStyleFont();
|
||||
};
|
||||
|
||||
struct nsStyleColor : public nsStyleStruct {
|
||||
nsStyleColor(void);
|
||||
~nsStyleColor(void);
|
||||
|
||||
nscolor mColor; // [inherited]
|
||||
|
||||
PRUint8 mBackgroundAttachment; // [reset] See nsStyleConsts.h
|
||||
|
@ -66,13 +71,11 @@ struct nsStyleColor : public nsStyleStruct {
|
|||
PRBool BackgroundIsTransparent() const {return (mBackgroundFlags &
|
||||
(NS_STYLE_BG_COLOR_TRANSPARENT | NS_STYLE_BG_IMAGE_NONE)) ==
|
||||
(NS_STYLE_BG_COLOR_TRANSPARENT | NS_STYLE_BG_IMAGE_NONE);}
|
||||
|
||||
protected:
|
||||
nsStyleColor(void);
|
||||
~nsStyleColor();
|
||||
};
|
||||
|
||||
struct nsStyleSpacing: public nsStyleStruct {
|
||||
nsStyleSpacing(void);
|
||||
|
||||
nsStyleSides mMargin; // [reset] length, percent, auto, inherit
|
||||
nsStyleSides mPadding; // [reset] length, percent, inherit
|
||||
nsStyleSides mBorder; // [reset] length, enum (see nsStyleConsts.h)
|
||||
|
@ -109,8 +112,6 @@ struct nsStyleSpacing: public nsStyleStruct {
|
|||
void CalcBorderPaddingFor(const nsIFrame* aFrame, nsMargin& aBorderPadding) const;
|
||||
|
||||
protected:
|
||||
nsStyleSpacing(void);
|
||||
|
||||
PRBool mHasCachedMargin;
|
||||
PRBool mHasCachedPadding;
|
||||
PRBool mHasCachedBorder;
|
||||
|
@ -128,16 +129,17 @@ protected:
|
|||
};
|
||||
|
||||
struct nsStyleList : public nsStyleStruct {
|
||||
nsStyleList(void);
|
||||
~nsStyleList(void);
|
||||
|
||||
PRUint8 mListStyleType; // [inherited] See nsStyleConsts.h
|
||||
PRUint8 mListStylePosition; // [inherited]
|
||||
nsString mListStyleImage; // [inherited] absolute url string
|
||||
|
||||
protected:
|
||||
nsStyleList(void);
|
||||
~nsStyleList(void);
|
||||
};
|
||||
|
||||
struct nsStylePosition : public nsStyleStruct {
|
||||
nsStylePosition(void);
|
||||
|
||||
PRUint8 mPosition; // [reset] see nsStyleConsts.h
|
||||
|
||||
nsStyleSides mOffset; // [reset]
|
||||
|
@ -153,12 +155,11 @@ struct nsStylePosition : public nsStyleStruct {
|
|||
|
||||
PRBool IsAbsolutelyPositioned() const {return (NS_STYLE_POSITION_ABSOLUTE == mPosition) ||
|
||||
(NS_STYLE_POSITION_FIXED == mPosition);}
|
||||
|
||||
protected:
|
||||
nsStylePosition(void);
|
||||
};
|
||||
|
||||
struct nsStyleText : public nsStyleStruct {
|
||||
nsStyleText(void);
|
||||
|
||||
PRUint8 mTextAlign; // [inherited] see nsStyleConsts.h
|
||||
PRUint8 mTextDecoration; // [reset] see nsStyleConsts.h
|
||||
PRUint8 mTextTransform; // [inherited] see nsStyleConsts.h
|
||||
|
@ -173,12 +174,11 @@ struct nsStyleText : public nsStyleStruct {
|
|||
PRBool WhiteSpaceIsSignificant() const {
|
||||
return mWhiteSpace == NS_STYLE_WHITESPACE_PRE;
|
||||
}
|
||||
|
||||
protected:
|
||||
nsStyleText(void);
|
||||
};
|
||||
|
||||
struct nsStyleDisplay : public nsStyleStruct {
|
||||
nsStyleDisplay(void);
|
||||
|
||||
PRUint8 mDirection; // [inherited] see nsStyleConsts.h NS_STYLE_DIRECTION_*
|
||||
PRUint8 mDisplay; // [reset] see nsStyleConsts.h NS_STYLE_DISPLAY_*
|
||||
PRUint8 mFloats; // [reset] see nsStyleConsts.h NS_STYLE_FLOAT_*
|
||||
|
@ -198,12 +198,11 @@ struct nsStyleDisplay : public nsStyleStruct {
|
|||
PRBool IsFloating() const {
|
||||
return NS_STYLE_FLOAT_NONE != mFloats;
|
||||
}
|
||||
|
||||
protected:
|
||||
nsStyleDisplay(void);
|
||||
};
|
||||
|
||||
struct nsStyleTable: public nsStyleStruct {
|
||||
nsStyleTable(void);
|
||||
|
||||
PRUint8 mLayoutStrategy;// [reset] see nsStyleConsts.h NS_STYLE_TABLE_LAYOUT_*
|
||||
PRUint8 mFrame; // [reset] see nsStyleConsts.h NS_STYLE_TABLE_FRAME_*
|
||||
PRUint8 mRules; // [reset] see nsStyleConsts.h NS_STYLE_TABLE_RULES_*
|
||||
|
@ -216,9 +215,6 @@ struct nsStyleTable: public nsStyleStruct {
|
|||
PRInt32 mCols; // [reset] an integer if set, or see nsStyleConsts.h NS_STYLE_TABLE_COLS_*
|
||||
PRInt32 mSpan; // [reset] the number of columns spanned by a colgroup or col
|
||||
nsStyleCoord mSpanWidth; // [reset] the amount of width this col gets from a spanning cell, if any
|
||||
|
||||
protected:
|
||||
nsStyleTable(void);
|
||||
};
|
||||
|
||||
enum nsStyleContentType {
|
||||
|
@ -244,6 +240,9 @@ struct nsStyleCounterData {
|
|||
};
|
||||
|
||||
struct nsStyleContent: public nsStyleStruct {
|
||||
nsStyleContent(void);
|
||||
~nsStyleContent(void);
|
||||
|
||||
PRUint32 ContentCount(void) const { return mContentCount; } // [reset]
|
||||
nsresult GetContentAt(PRUint32 aIndex, nsStyleContentType& aType, nsString& aContent) const;
|
||||
nsresult AllocateContents(PRUint32 aCount);
|
||||
|
@ -267,9 +266,6 @@ struct nsStyleContent: public nsStyleStruct {
|
|||
nsresult SetQuotesAt(PRUint32 aIndex, const nsString& aOpen, const nsString& aClose);
|
||||
|
||||
protected:
|
||||
nsStyleContent(void);
|
||||
~nsStyleContent(void);
|
||||
|
||||
PRUint32 mContentCount;
|
||||
nsStyleContentData* mContents;
|
||||
|
||||
|
@ -284,14 +280,14 @@ protected:
|
|||
};
|
||||
|
||||
struct nsStyleUserInterface: public nsStyleStruct {
|
||||
nsStyleUserInterface(void);
|
||||
|
||||
PRUint8 mUserInput; // [inherited]
|
||||
PRUint8 mUserModify; // [inherited] (modify-content)
|
||||
PRUint8 mUserSelect; // [reset] (selection-style)
|
||||
PRUint8 mUserFocus; // [inherited] (auto-select)
|
||||
PRUnichar mKeyEquivalent; // [reset] XXX what type should this be?
|
||||
PRUint8 mResizer; // [reset]
|
||||
protected:
|
||||
nsStyleUserInterface(void);
|
||||
};
|
||||
|
||||
#define BORDER_PRECEDENT_EQUAL 0
|
||||
|
@ -368,7 +364,19 @@ public:
|
|||
nsISupportsArray* aRules,
|
||||
nsIStyleContext*& aResult) = 0;
|
||||
|
||||
// Fill a style struct with data
|
||||
NS_IMETHOD GetStyle(nsStyleStructID aSID, nsStyleStruct& aStruct) const = 0;
|
||||
|
||||
// compute the effective difference between two contexts
|
||||
NS_IMETHOD CalcStyleDifference(nsIStyleContext* aOther, PRInt32& aHint) const = 0;
|
||||
|
||||
// debugging
|
||||
virtual void List(FILE* out, PRInt32 aIndent) = 0;
|
||||
|
||||
// -------------------------------------------------------------
|
||||
// DEPRECATED METHODS - these are all going away, stop using them
|
||||
// get a style data struct by ID, may return null
|
||||
// Replace calls to this with calls to GetStyle();
|
||||
virtual const nsStyleStruct* GetStyleData(nsStyleStructID aSID) = 0;
|
||||
|
||||
// get a style data struct by ID, may return null
|
||||
|
@ -381,12 +389,6 @@ public:
|
|||
|
||||
// call if you change style data after creation
|
||||
virtual void RecalcAutomaticData(nsIPresContext* aPresContext) = 0;
|
||||
|
||||
// compute the effective difference between two contexts
|
||||
NS_IMETHOD CalcStyleDifference(nsIStyleContext* aOther, PRInt32& aHint) const = 0;
|
||||
|
||||
// debugging
|
||||
virtual void List(FILE* out, PRInt32 aIndent) = 0;
|
||||
};
|
||||
|
||||
// this is private to nsStyleSet, don't call it
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include "nsISupports.h"
|
||||
|
||||
class nsIStyleSheet;
|
||||
class nsIStyleContext;
|
||||
class nsIMutableStyleContext;
|
||||
class nsIPresContext;
|
||||
class nsIContent;
|
||||
|
||||
|
@ -42,9 +42,9 @@ public:
|
|||
NS_IMETHOD GetStrength(PRInt32& aStrength) const = 0;
|
||||
|
||||
// Map only font data into style context
|
||||
NS_IMETHOD MapFontStyleInto(nsIStyleContext* aContext, nsIPresContext* aPresContext) = 0;
|
||||
NS_IMETHOD MapFontStyleInto(nsIMutableStyleContext* aContext, nsIPresContext* aPresContext) = 0;
|
||||
// Map all non-font info into style context
|
||||
NS_IMETHOD MapStyleInto(nsIStyleContext* aContext, nsIPresContext* aPresContext) = 0;
|
||||
NS_IMETHOD MapStyleInto(nsIMutableStyleContext* aContext, nsIPresContext* aPresContext) = 0;
|
||||
|
||||
NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const = 0;
|
||||
};
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
* Reserved.
|
||||
*/
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsString.h"
|
||||
#include "nsUnitConversion.h"
|
||||
|
@ -33,6 +34,11 @@ static NS_DEFINE_IID(kIStyleContextIID, NS_ISTYLECONTEXT_IID);
|
|||
// --------------------
|
||||
// nsStyleFont
|
||||
//
|
||||
nsStyleFont::nsStyleFont(void)
|
||||
: mFont(nsnull, NS_FONT_STYLE_NORMAL, NS_FONT_VARIANT_NORMAL, NS_FONT_WEIGHT_NORMAL, NS_FONT_DECORATION_NONE, 0),
|
||||
mFixedFont(nsnull, NS_FONT_STYLE_NORMAL, NS_FONT_VARIANT_NORMAL, NS_FONT_WEIGHT_NORMAL, NS_FONT_DECORATION_NONE, 0)
|
||||
{}
|
||||
|
||||
nsStyleFont::nsStyleFont(const nsFont& aVariableFont, const nsFont& aFixedFont)
|
||||
: mFont(aVariableFont),
|
||||
mFixedFont(aFixedFont)
|
||||
|
@ -46,6 +52,8 @@ struct StyleFontImpl : public nsStyleFont {
|
|||
{}
|
||||
|
||||
void ResetFrom(const nsStyleFont* aParent, nsIPresContext* aPresContext);
|
||||
void SetFrom(const nsStyleFont& aSource);
|
||||
void CopyTo(nsStyleFont& aDest) const;
|
||||
PRInt32 CalcDifference(const StyleFontImpl& aOther) const;
|
||||
static PRInt32 CalcFontDifference(const nsFont& aFont1, const nsFont& aFont2);
|
||||
|
||||
|
@ -68,6 +76,20 @@ void StyleFontImpl::ResetFrom(const nsStyleFont* aParent, nsIPresContext* aPresC
|
|||
}
|
||||
}
|
||||
|
||||
void StyleFontImpl::SetFrom(const nsStyleFont& aSource)
|
||||
{
|
||||
mFont = aSource.mFont;
|
||||
mFixedFont = aSource.mFixedFont;
|
||||
mFlags = aSource.mFlags;
|
||||
}
|
||||
|
||||
void StyleFontImpl::CopyTo(nsStyleFont& aDest) const
|
||||
{
|
||||
aDest.mFont = mFont;
|
||||
aDest.mFixedFont = mFixedFont;
|
||||
aDest.mFlags = mFlags;
|
||||
}
|
||||
|
||||
PRInt32 StyleFontImpl::CalcDifference(const StyleFontImpl& aOther) const
|
||||
{
|
||||
if (mFlags == aOther.mFlags) {
|
||||
|
@ -106,6 +128,8 @@ struct StyleColorImpl: public nsStyleColor {
|
|||
StyleColorImpl(void) { }
|
||||
|
||||
void ResetFrom(const nsStyleColor* aParent, nsIPresContext* aPresContext);
|
||||
void SetFrom(const nsStyleColor& aSource);
|
||||
void CopyTo(nsStyleColor& aDest) const;
|
||||
PRInt32 CalcDifference(const StyleColorImpl& aOther) const;
|
||||
|
||||
private: // These are not allowed
|
||||
|
@ -148,6 +172,42 @@ void StyleColorImpl::ResetFrom(const nsStyleColor* aParent, nsIPresContext* aPre
|
|||
mCursor = NS_STYLE_CURSOR_AUTO;
|
||||
}
|
||||
|
||||
void StyleColorImpl::SetFrom(const nsStyleColor& aSource)
|
||||
{
|
||||
mColor = aSource.mColor;
|
||||
|
||||
mBackgroundAttachment = aSource.mBackgroundAttachment;
|
||||
mBackgroundFlags = aSource.mBackgroundFlags;
|
||||
mBackgroundRepeat = aSource.mBackgroundRepeat;
|
||||
|
||||
mBackgroundColor = aSource.mBackgroundColor;
|
||||
mBackgroundXPosition = aSource.mBackgroundXPosition;
|
||||
mBackgroundYPosition = aSource.mBackgroundYPosition;
|
||||
mBackgroundImage = aSource.mBackgroundImage;
|
||||
|
||||
mCursor = aSource.mCursor;
|
||||
mCursorImage = aSource.mCursorImage;
|
||||
mOpacity = aSource.mOpacity;
|
||||
}
|
||||
|
||||
void StyleColorImpl::CopyTo(nsStyleColor& aDest) const
|
||||
{
|
||||
aDest.mColor = mColor;
|
||||
|
||||
aDest.mBackgroundAttachment = mBackgroundAttachment;
|
||||
aDest.mBackgroundFlags = mBackgroundFlags;
|
||||
aDest.mBackgroundRepeat = mBackgroundRepeat;
|
||||
|
||||
aDest.mBackgroundColor = mBackgroundColor;
|
||||
aDest.mBackgroundXPosition = mBackgroundXPosition;
|
||||
aDest.mBackgroundYPosition = mBackgroundYPosition;
|
||||
aDest.mBackgroundImage = mBackgroundImage;
|
||||
|
||||
aDest.mCursor = mCursor;
|
||||
aDest.mCursorImage = mCursorImage;
|
||||
aDest.mOpacity = mOpacity;
|
||||
}
|
||||
|
||||
PRInt32 StyleColorImpl::CalcDifference(const StyleColorImpl& aOther) const
|
||||
{
|
||||
if ((mColor == aOther.mColor) &&
|
||||
|
@ -461,6 +521,8 @@ struct StyleSpacingImpl: public nsStyleSpacing {
|
|||
{}
|
||||
|
||||
void ResetFrom(const nsStyleSpacing* aParent, nsIPresContext* aPresContext);
|
||||
void SetFrom(const nsStyleSpacing& aSource);
|
||||
void CopyTo(nsStyleSpacing& aDest) const;
|
||||
void RecalcData(nsIPresContext* aPresContext, nscolor color);
|
||||
PRInt32 CalcDifference(const StyleSpacingImpl& aOther) const;
|
||||
};
|
||||
|
@ -514,6 +576,16 @@ void StyleSpacingImpl::ResetFrom(const nsStyleSpacing* aParent, nsIPresContext*
|
|||
mHasCachedOutline = PR_FALSE;
|
||||
}
|
||||
|
||||
void StyleSpacingImpl::SetFrom(const nsStyleSpacing& aSource)
|
||||
{
|
||||
nsCRT::memcpy((nsStyleSpacing*)this, &aSource, sizeof(nsStyleSpacing));
|
||||
}
|
||||
|
||||
void StyleSpacingImpl::CopyTo(nsStyleSpacing& aDest) const
|
||||
{
|
||||
nsCRT::memcpy(&aDest, (const nsStyleSpacing*)this, sizeof(nsStyleSpacing));
|
||||
}
|
||||
|
||||
inline PRBool IsFixedUnit(nsStyleUnit aUnit, PRBool aEnumOK)
|
||||
{
|
||||
return PRBool((aUnit == eStyleUnit_Null) ||
|
||||
|
@ -703,6 +775,8 @@ struct StyleListImpl: public nsStyleList {
|
|||
StyleListImpl(void) { }
|
||||
|
||||
void ResetFrom(const nsStyleList* aParent, nsIPresContext* aPresContext);
|
||||
void SetFrom(const nsStyleList& aSource);
|
||||
void CopyTo(nsStyleList& aDest) const;
|
||||
PRInt32 CalcDifference(const StyleListImpl& aOther) const;
|
||||
};
|
||||
|
||||
|
@ -720,6 +794,20 @@ void StyleListImpl::ResetFrom(const nsStyleList* aParent, nsIPresContext* aPresC
|
|||
}
|
||||
}
|
||||
|
||||
void StyleListImpl::SetFrom(const nsStyleList& aSource)
|
||||
{
|
||||
mListStyleType = aSource.mListStyleType;
|
||||
mListStylePosition = aSource.mListStylePosition;
|
||||
mListStyleImage = aSource.mListStyleImage;
|
||||
}
|
||||
|
||||
void StyleListImpl::CopyTo(nsStyleList& aDest) const
|
||||
{
|
||||
aDest.mListStyleType = mListStyleType;
|
||||
aDest.mListStylePosition = mListStylePosition;
|
||||
aDest.mListStyleImage = mListStyleImage;
|
||||
}
|
||||
|
||||
PRInt32 StyleListImpl::CalcDifference(const StyleListImpl& aOther) const
|
||||
{
|
||||
if (mListStylePosition == aOther.mListStylePosition) {
|
||||
|
@ -744,6 +832,8 @@ struct StylePositionImpl: public nsStylePosition {
|
|||
StylePositionImpl(void) { }
|
||||
|
||||
void ResetFrom(const nsStylePosition* aParent, nsIPresContext* aPresContext);
|
||||
void SetFrom(const nsStylePosition& aSource);
|
||||
void CopyTo(nsStylePosition& aDest) const;
|
||||
PRInt32 CalcDifference(const StylePositionImpl& aOther) const;
|
||||
|
||||
private: // These are not allowed
|
||||
|
@ -770,6 +860,16 @@ void StylePositionImpl::ResetFrom(const nsStylePosition* aParent, nsIPresContext
|
|||
mZIndex.SetAutoValue();
|
||||
}
|
||||
|
||||
void StylePositionImpl::SetFrom(const nsStylePosition& aSource)
|
||||
{
|
||||
nsCRT::memcpy((nsStylePosition*)this, &aSource, sizeof(nsStylePosition));
|
||||
}
|
||||
|
||||
void StylePositionImpl::CopyTo(nsStylePosition& aDest) const
|
||||
{
|
||||
nsCRT::memcpy(&aDest, (const nsStylePosition*)this, sizeof(nsStylePosition));
|
||||
}
|
||||
|
||||
PRInt32 StylePositionImpl::CalcDifference(const StylePositionImpl& aOther) const
|
||||
{
|
||||
if (mPosition == aOther.mPosition) {
|
||||
|
@ -799,6 +899,8 @@ struct StyleTextImpl: public nsStyleText {
|
|||
StyleTextImpl(void) { }
|
||||
|
||||
void ResetFrom(const nsStyleText* aParent, nsIPresContext* aPresContext);
|
||||
void SetFrom(const nsStyleText& aSource);
|
||||
void CopyTo(nsStyleText& aDest) const;
|
||||
PRInt32 CalcDifference(const StyleTextImpl& aOther) const;
|
||||
};
|
||||
|
||||
|
@ -837,7 +939,16 @@ void StyleTextImpl::ResetFrom(const nsStyleText* aParent, nsIPresContext* aPresC
|
|||
mTextIndent.SetCoordValue(0);
|
||||
mWordSpacing.SetNormalValue();
|
||||
}
|
||||
}
|
||||
|
||||
void StyleTextImpl::SetFrom(const nsStyleText& aSource)
|
||||
{
|
||||
nsCRT::memcpy((nsStyleText*)this, &aSource, sizeof(nsStyleText));
|
||||
}
|
||||
|
||||
void StyleTextImpl::CopyTo(nsStyleText& aDest) const
|
||||
{
|
||||
nsCRT::memcpy(&aDest, (const nsStyleText*)this, sizeof(nsStyleText));
|
||||
}
|
||||
|
||||
PRInt32 StyleTextImpl::CalcDifference(const StyleTextImpl& aOther) const
|
||||
|
@ -868,6 +979,8 @@ struct StyleDisplayImpl: public nsStyleDisplay {
|
|||
StyleDisplayImpl(void) { }
|
||||
|
||||
void ResetFrom(const nsStyleDisplay* aParent, nsIPresContext* aPresContext);
|
||||
void SetFrom(const nsStyleDisplay& aSource);
|
||||
void CopyTo(nsStyleDisplay& aDest) const;
|
||||
PRInt32 CalcDifference(const StyleDisplayImpl& aOther) const;
|
||||
};
|
||||
|
||||
|
@ -891,6 +1004,16 @@ void StyleDisplayImpl::ResetFrom(const nsStyleDisplay* aParent, nsIPresContext*
|
|||
mClip.SizeTo(0,0,0,0);
|
||||
}
|
||||
|
||||
void StyleDisplayImpl::SetFrom(const nsStyleDisplay& aSource)
|
||||
{
|
||||
nsCRT::memcpy((nsStyleDisplay*)this, &aSource, sizeof(nsStyleDisplay));
|
||||
}
|
||||
|
||||
void StyleDisplayImpl::CopyTo(nsStyleDisplay& aDest) const
|
||||
{
|
||||
nsCRT::memcpy(&aDest, (const nsStyleDisplay*)this, sizeof(nsStyleDisplay));
|
||||
}
|
||||
|
||||
PRInt32 StyleDisplayImpl::CalcDifference(const StyleDisplayImpl& aOther) const
|
||||
{
|
||||
if ((mDisplay == aOther.mDisplay) &&
|
||||
|
@ -927,6 +1050,8 @@ struct StyleTableImpl: public nsStyleTable {
|
|||
StyleTableImpl(void);
|
||||
|
||||
void ResetFrom(const nsStyleTable* aParent, nsIPresContext* aPresContext);
|
||||
void SetFrom(const nsStyleTable& aSource);
|
||||
void CopyTo(nsStyleTable& aDest) const;
|
||||
PRInt32 CalcDifference(const StyleTableImpl& aOther) const;
|
||||
};
|
||||
|
||||
|
@ -963,6 +1088,16 @@ void StyleTableImpl::ResetFrom(const nsStyleTable* aParent, nsIPresContext* aPre
|
|||
}
|
||||
}
|
||||
|
||||
void StyleTableImpl::SetFrom(const nsStyleTable& aSource)
|
||||
{
|
||||
nsCRT::memcpy((nsStyleTable*)this, &aSource, sizeof(nsStyleTable));
|
||||
}
|
||||
|
||||
void StyleTableImpl::CopyTo(nsStyleTable& aDest) const
|
||||
{
|
||||
nsCRT::memcpy(&aDest, (const nsStyleTable*)this, sizeof(nsStyleTable));
|
||||
}
|
||||
|
||||
PRInt32 StyleTableImpl::CalcDifference(const StyleTableImpl& aOther) const
|
||||
{
|
||||
if ((mLayoutStrategy == aOther.mLayoutStrategy) &&
|
||||
|
@ -1177,6 +1312,8 @@ struct StyleContentImpl: public nsStyleContent {
|
|||
StyleContentImpl(void) : nsStyleContent() { };
|
||||
|
||||
void ResetFrom(const StyleContentImpl* aParent, nsIPresContext* aPresContext);
|
||||
void SetFrom(const nsStyleContent& aSource);
|
||||
void CopyTo(nsStyleContent& aDest) const;
|
||||
PRInt32 CalcDifference(const StyleContentImpl& aOther) const;
|
||||
};
|
||||
|
||||
|
@ -1207,6 +1344,73 @@ StyleContentImpl::ResetFrom(const StyleContentImpl* aParent, nsIPresContext* aPr
|
|||
}
|
||||
}
|
||||
|
||||
void StyleContentImpl::SetFrom(const nsStyleContent& aSource)
|
||||
{
|
||||
mMarkerOffset = aSource.mMarkerOffset;
|
||||
|
||||
PRUint32 index;
|
||||
if (NS_SUCCEEDED(AllocateContents(aSource.ContentCount()))) {
|
||||
for (index = 0; index < mContentCount; index++) {
|
||||
aSource.GetContentAt(index, mContents[index].mType, mContents[index].mContent);
|
||||
}
|
||||
}
|
||||
|
||||
if (NS_SUCCEEDED(AllocateCounterIncrements(aSource.CounterIncrementCount()))) {
|
||||
for (index = 0; index < mIncrementCount; index++) {
|
||||
aSource.GetCounterIncrementAt(index, mIncrements[index].mCounter,
|
||||
mIncrements[index].mValue);
|
||||
}
|
||||
}
|
||||
|
||||
if (NS_SUCCEEDED(AllocateCounterResets(aSource.CounterResetCount()))) {
|
||||
for (index = 0; index < mResetCount; index++) {
|
||||
aSource.GetCounterResetAt(index, mResets[index].mCounter,
|
||||
mResets[index].mValue);
|
||||
}
|
||||
}
|
||||
|
||||
if (NS_SUCCEEDED(AllocateQuotes(aSource.QuotesCount()))) {
|
||||
PRUint32 count = (mQuotesCount * 2);
|
||||
for (index = 0; index < count; index += 2) {
|
||||
aSource.GetQuotesAt(index, mQuotes[index], mQuotes[index + 1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void StyleContentImpl::CopyTo(nsStyleContent& aDest) const
|
||||
{
|
||||
aDest.mMarkerOffset = mMarkerOffset;
|
||||
|
||||
PRUint32 index;
|
||||
if (NS_SUCCEEDED(aDest.AllocateContents(mContentCount))) {
|
||||
for (index = 0; index < mContentCount; index++) {
|
||||
aDest.SetContentAt(index, mContents[index].mType,
|
||||
mContents[index].mContent);
|
||||
}
|
||||
}
|
||||
|
||||
if (NS_SUCCEEDED(aDest.AllocateCounterIncrements(mIncrementCount))) {
|
||||
for (index = 0; index < mIncrementCount; index++) {
|
||||
aDest.SetCounterIncrementAt(index, mIncrements[index].mCounter,
|
||||
mIncrements[index].mValue);
|
||||
}
|
||||
}
|
||||
|
||||
if (NS_SUCCEEDED(aDest.AllocateCounterResets(mResetCount))) {
|
||||
for (index = 0; index < mResetCount; index++) {
|
||||
aDest.SetCounterResetAt(index, mResets[index].mCounter,
|
||||
mResets[index].mValue);
|
||||
}
|
||||
}
|
||||
|
||||
if (NS_SUCCEEDED(aDest.AllocateQuotes(mQuotesCount))) {
|
||||
PRUint32 count = (mQuotesCount * 2);
|
||||
for (index = 0; index < count; index += 2) {
|
||||
aDest.SetQuotesAt(index, mQuotes[index], mQuotes[index + 1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
PRInt32
|
||||
StyleContentImpl::CalcDifference(const StyleContentImpl& aOther) const
|
||||
{
|
||||
|
@ -1259,6 +1463,8 @@ struct StyleUserInterfaceImpl: public nsStyleUserInterface {
|
|||
StyleUserInterfaceImpl(void) { }
|
||||
|
||||
void ResetFrom(const nsStyleUserInterface* aParent, nsIPresContext* aPresContext);
|
||||
void SetFrom(const nsStyleUserInterface& aSource);
|
||||
void CopyTo(nsStyleUserInterface& aDest) const;
|
||||
PRInt32 CalcDifference(const StyleUserInterfaceImpl& aOther) const;
|
||||
|
||||
private: // These are not allowed
|
||||
|
@ -1284,6 +1490,16 @@ void StyleUserInterfaceImpl::ResetFrom(const nsStyleUserInterface* aParent, nsIP
|
|||
mResizer = NS_STYLE_RESIZER_AUTO;
|
||||
}
|
||||
|
||||
void StyleUserInterfaceImpl::SetFrom(const nsStyleUserInterface& aSource)
|
||||
{
|
||||
nsCRT::memcpy((nsStyleUserInterface*)this, &aSource, sizeof(nsStyleUserInterface));
|
||||
}
|
||||
|
||||
void StyleUserInterfaceImpl::CopyTo(nsStyleUserInterface& aDest) const
|
||||
{
|
||||
nsCRT::memcpy(&aDest, (const nsStyleUserInterface*)this, sizeof(nsStyleUserInterface));
|
||||
}
|
||||
|
||||
PRInt32 StyleUserInterfaceImpl::CalcDifference(const StyleUserInterfaceImpl& aOther) const
|
||||
{
|
||||
if ((mUserInput == aOther.mUserInput) &&
|
||||
|
@ -1309,7 +1525,8 @@ PRInt32 StyleUserInterfaceImpl::CalcDifference(const StyleUserInterfaceImpl& aOt
|
|||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
class StyleContextImpl : public nsIStyleContext {
|
||||
class StyleContextImpl : public nsIStyleContext,
|
||||
protected nsIMutableStyleContext { // you can't QI to nsIMutableStyleContext
|
||||
public:
|
||||
StyleContextImpl(nsIStyleContext* aParent, nsIAtom* aPseudoTag,
|
||||
nsISupportsArray* aRules,
|
||||
|
@ -1333,6 +1550,9 @@ public:
|
|||
|
||||
NS_IMETHOD RemapStyle(nsIPresContext* aPresContext, PRBool aRecurse = PR_TRUE);
|
||||
|
||||
NS_IMETHOD GetStyle(nsStyleStructID aSID, nsStyleStruct& aStruct) const;
|
||||
NS_IMETHOD SetStyle(nsStyleStructID aSID, const nsStyleStruct& aStruct);
|
||||
|
||||
virtual const nsStyleStruct* GetStyleData(nsStyleStructID aSID);
|
||||
virtual nsStyleStruct* GetMutableStyleData(nsStyleStructID aSID);
|
||||
|
||||
|
@ -1432,7 +1652,29 @@ StyleContextImpl::~StyleContextImpl()
|
|||
NS_IF_RELEASE(mRules);
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS(StyleContextImpl, kIStyleContextIID)
|
||||
NS_IMPL_ADDREF(StyleContextImpl)
|
||||
NS_IMPL_RELEASE(StyleContextImpl)
|
||||
|
||||
NS_IMETHODIMP
|
||||
StyleContextImpl::QueryInterface(const nsIID& aIID, void** aInstancePtr)
|
||||
{
|
||||
NS_PRECONDITION(nsnull != aInstancePtr, "null pointer");
|
||||
if (nsnull == aInstancePtr) {
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
}
|
||||
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
|
||||
if (aIID.Equals(nsIStyleContext::GetIID())) {
|
||||
*aInstancePtr = (void*)(nsIStyleContext*)this;
|
||||
NS_ADDREF_THIS();
|
||||
return NS_OK;
|
||||
}
|
||||
if (aIID.Equals(kISupportsIID)) {
|
||||
*aInstancePtr = (void*) (nsISupports*)(nsIStyleContext*)this;
|
||||
NS_ADDREF_THIS();
|
||||
return NS_OK;
|
||||
}
|
||||
return NS_NOINTERFACE;
|
||||
}
|
||||
|
||||
nsIStyleContext* StyleContextImpl::GetParent(void) const
|
||||
{
|
||||
|
@ -1713,13 +1955,101 @@ nsStyleStruct* StyleContextImpl::GetMutableStyleData(nsStyleStructID aSID)
|
|||
return result;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
StyleContextImpl::GetStyle(nsStyleStructID aSID, nsStyleStruct& aStruct) const
|
||||
{
|
||||
nsresult result = NS_OK;
|
||||
switch (aSID) {
|
||||
case eStyleStruct_Font:
|
||||
mFont.CopyTo((nsStyleFont&)aStruct);
|
||||
break;
|
||||
case eStyleStruct_Color:
|
||||
mColor.CopyTo((nsStyleColor&)aStruct);
|
||||
break;
|
||||
case eStyleStruct_Spacing:
|
||||
mSpacing.CopyTo((nsStyleSpacing&)aStruct);
|
||||
break;
|
||||
case eStyleStruct_List:
|
||||
mList.CopyTo((nsStyleList&)aStruct);
|
||||
break;
|
||||
case eStyleStruct_Position:
|
||||
mPosition.CopyTo((nsStylePosition&)aStruct);
|
||||
break;
|
||||
case eStyleStruct_Text:
|
||||
mText.CopyTo((nsStyleText&)aStruct);
|
||||
break;
|
||||
case eStyleStruct_Display:
|
||||
mDisplay.CopyTo((nsStyleDisplay&)aStruct);
|
||||
break;
|
||||
case eStyleStruct_Table:
|
||||
mTable.CopyTo((nsStyleTable&)aStruct);
|
||||
break;
|
||||
case eStyleStruct_Content:
|
||||
mContent.CopyTo((nsStyleContent&)aStruct);
|
||||
break;
|
||||
case eStyleStruct_UserInterface:
|
||||
mUserInterface.CopyTo((nsStyleUserInterface&)aStruct);
|
||||
break;
|
||||
default:
|
||||
NS_ERROR("Invalid style struct id");
|
||||
result = NS_ERROR_INVALID_ARG;
|
||||
break;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
StyleContextImpl::SetStyle(nsStyleStructID aSID, const nsStyleStruct& aStruct)
|
||||
{
|
||||
nsresult result = NS_OK;
|
||||
switch (aSID) {
|
||||
case eStyleStruct_Font:
|
||||
mFont.SetFrom((const nsStyleFont&)aStruct);
|
||||
break;
|
||||
case eStyleStruct_Color:
|
||||
mColor.SetFrom((const nsStyleColor&)aStruct);
|
||||
break;
|
||||
case eStyleStruct_Spacing:
|
||||
mSpacing.SetFrom((const nsStyleSpacing&)aStruct);
|
||||
break;
|
||||
case eStyleStruct_List:
|
||||
mList.SetFrom((const nsStyleList&)aStruct);
|
||||
break;
|
||||
case eStyleStruct_Position:
|
||||
mPosition.SetFrom((const nsStylePosition&)aStruct);
|
||||
break;
|
||||
case eStyleStruct_Text:
|
||||
mText.SetFrom((const nsStyleText&)aStruct);
|
||||
break;
|
||||
case eStyleStruct_Display:
|
||||
mDisplay.SetFrom((const nsStyleDisplay&)aStruct);
|
||||
break;
|
||||
case eStyleStruct_Table:
|
||||
mTable.SetFrom((const nsStyleTable&)aStruct);
|
||||
break;
|
||||
case eStyleStruct_Content:
|
||||
mContent.SetFrom((const nsStyleContent&)aStruct);
|
||||
break;
|
||||
case eStyleStruct_UserInterface:
|
||||
mUserInterface.SetFrom((const nsStyleUserInterface&)aStruct);
|
||||
break;
|
||||
default:
|
||||
NS_ERROR("Invalid style struct id");
|
||||
result = NS_ERROR_INVALID_ARG;
|
||||
break;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
struct MapStyleData {
|
||||
MapStyleData(nsIStyleContext* aStyleContext, nsIPresContext* aPresContext)
|
||||
MapStyleData(nsIMutableStyleContext* aStyleContext, nsIPresContext* aPresContext)
|
||||
{
|
||||
mStyleContext = aStyleContext;
|
||||
mPresContext = aPresContext;
|
||||
}
|
||||
nsIStyleContext* mStyleContext;
|
||||
nsIMutableStyleContext* mStyleContext;
|
||||
nsIPresContext* mPresContext;
|
||||
};
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
class nsString;
|
||||
class nsIFrame;
|
||||
class nsIStyleRule;
|
||||
class nsIStyleContext;
|
||||
class nsIMutableStyleContext;
|
||||
class nsIPresContext;
|
||||
class nsXIFConverter;
|
||||
class nsIHTMLMappedAttributes;
|
||||
|
@ -35,7 +35,7 @@ class nsIURI;
|
|||
{0x89, 0x5c, 0x00, 0x60, 0x08, 0x91, 0x1b, 0x81} }
|
||||
|
||||
typedef void (*nsMapAttributesFunc)(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext);
|
||||
|
||||
// Abstract interface for all html content
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
#include "nsIScriptObjectOwner.h"
|
||||
#include "nsISizeOfHandler.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsIStyleRule.h"
|
||||
#include "nsISupportsArray.h"
|
||||
#include "nsIURL.h"
|
||||
|
@ -1992,7 +1993,7 @@ nsGenericHTMLElement::ParseStyleAttribute(const nsString& aValue, nsHTMLValue& a
|
|||
*/
|
||||
void
|
||||
nsGenericHTMLElement::MapCommonAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aStyleContext,
|
||||
nsIMutableStyleContext* aStyleContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
nsHTMLValue value;
|
||||
|
@ -2021,7 +2022,7 @@ nsGenericHTMLElement::GetCommonMappedAttributesImpact(const nsIAtom* aAttribute,
|
|||
|
||||
void
|
||||
nsGenericHTMLElement::MapImageAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
nsHTMLValue value;
|
||||
|
@ -2098,7 +2099,7 @@ nsGenericHTMLElement::GetImageMappedAttributesImpact(const nsIAtom* aAttribute,
|
|||
|
||||
void
|
||||
nsGenericHTMLElement::MapImageAlignAttributeInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
nsHTMLValue value;
|
||||
|
@ -2146,7 +2147,7 @@ nsGenericHTMLElement::GetImageAlignAttributeImpact(const nsIAtom* aAttribute,
|
|||
|
||||
void
|
||||
nsGenericHTMLElement::MapImageBorderAttributeInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext,
|
||||
nscolor aBorderColors[4])
|
||||
{
|
||||
|
@ -2221,7 +2222,7 @@ nsGenericHTMLElement::GetImageBorderAttributeImpact(const nsIAtom* aAttribute,
|
|||
|
||||
void
|
||||
nsGenericHTMLElement::MapBackgroundAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
nsHTMLValue value;
|
||||
|
|
|
@ -39,7 +39,7 @@ class nsIFrame;
|
|||
class nsIHTMLAttributes;
|
||||
class nsIHTMLMappedAttributes;
|
||||
class nsIHTMLContent;
|
||||
class nsIStyleContext;
|
||||
class nsIMutableStyleContext;
|
||||
class nsIStyleRule;
|
||||
class nsISupportsArray;
|
||||
class nsIDOMScriptObjectFactory;
|
||||
|
@ -247,32 +247,32 @@ public:
|
|||
*/
|
||||
|
||||
static void MapCommonAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aStyleContext,
|
||||
nsIMutableStyleContext* aStyleContext,
|
||||
nsIPresContext* aPresContext);
|
||||
static PRBool GetCommonMappedAttributesImpact(const nsIAtom* aAttribute,
|
||||
PRInt32& aHint);
|
||||
|
||||
static void MapImageAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext);
|
||||
static PRBool GetImageMappedAttributesImpact(const nsIAtom* aAttribute,
|
||||
PRInt32& aHint);
|
||||
|
||||
static void MapImageAlignAttributeInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext);
|
||||
static PRBool GetImageAlignAttributeImpact(const nsIAtom* aAttribute,
|
||||
PRInt32& aHint);
|
||||
|
||||
static void MapImageBorderAttributeInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext,
|
||||
nscolor aBorderColors[4]);
|
||||
static PRBool GetImageBorderAttributeImpact(const nsIAtom* aAttribute,
|
||||
PRInt32& aHint);
|
||||
|
||||
static void MapBackgroundAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext);
|
||||
static PRBool GetBackgroundAttributesImpact(const nsIAtom* aAttribute,
|
||||
PRInt32& aHint);
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
#include "nsINameSpaceManager.h"
|
||||
|
@ -253,7 +254,7 @@ nsHTMLAnchorElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aContext, aPresContext);
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
#include "nsIDocument.h"
|
||||
|
@ -214,7 +215,7 @@ nsHTMLAppletElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aContext, aPresContext);
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
#include "nsIFocusableContent.h"
|
||||
|
@ -187,7 +188,7 @@ nsHTMLAreaElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aContext, aPresContext);
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
#include "nsIHTMLAttributes.h"
|
||||
|
@ -163,7 +164,7 @@ nsHTMLBRElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
nsStyleDisplay* display = (nsStyleDisplay*)
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
|
||||
|
@ -146,7 +147,7 @@ nsHTMLBaseElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aContext, aPresContext);
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
|
||||
|
@ -151,7 +152,7 @@ nsHTMLBaseFontElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapFontAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
// XXX write me
|
||||
|
@ -159,7 +160,7 @@ MapFontAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aContext, aPresContext);
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
#include "nsIPresShell.h"
|
||||
|
@ -64,9 +65,9 @@ public:
|
|||
// Strength is an out-of-band weighting, always 0 here
|
||||
NS_IMETHOD GetStrength(PRInt32& aStrength) const;
|
||||
|
||||
NS_IMETHOD MapFontStyleInto(nsIStyleContext* aContext,
|
||||
NS_IMETHOD MapFontStyleInto(nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext);
|
||||
NS_IMETHOD MapStyleInto(nsIStyleContext* aContext,
|
||||
NS_IMETHOD MapStyleInto(nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext);
|
||||
|
||||
NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const;
|
||||
|
@ -90,9 +91,9 @@ public:
|
|||
// Strength is an out-of-band weighting, always maxint here
|
||||
NS_IMETHOD GetStrength(PRInt32& aStrength) const;
|
||||
|
||||
NS_IMETHOD MapFontStyleInto(nsIStyleContext* aContext,
|
||||
NS_IMETHOD MapFontStyleInto(nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext);
|
||||
NS_IMETHOD MapStyleInto(nsIStyleContext* aContext,
|
||||
NS_IMETHOD MapStyleInto(nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext);
|
||||
|
||||
NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const;
|
||||
|
@ -258,7 +259,7 @@ BodyRule::GetStrength(PRInt32& aStrength) const
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
BodyRule::MapFontStyleInto(nsIStyleContext* aContext, nsIPresContext* aPresContext)
|
||||
BodyRule::MapFontStyleInto(nsIMutableStyleContext* aContext, nsIPresContext* aPresContext)
|
||||
{
|
||||
// set up the basefont (defaults to 3)
|
||||
nsStyleFont* font = (nsStyleFont*)aContext->GetMutableStyleData(eStyleStruct_Font);
|
||||
|
@ -279,7 +280,7 @@ BodyRule::MapFontStyleInto(nsIStyleContext* aContext, nsIPresContext* aPresConte
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
BodyRule::MapStyleInto(nsIStyleContext* aContext, nsIPresContext* aPresContext)
|
||||
BodyRule::MapStyleInto(nsIMutableStyleContext* aContext, nsIPresContext* aPresContext)
|
||||
{
|
||||
if (nsnull != mPart) {
|
||||
|
||||
|
@ -456,13 +457,13 @@ BodyFixupRule::GetStrength(PRInt32& aStrength) const
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
BodyFixupRule::MapFontStyleInto(nsIStyleContext* aContext, nsIPresContext* aPresContext)
|
||||
BodyFixupRule::MapFontStyleInto(nsIMutableStyleContext* aContext, nsIPresContext* aPresContext)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
BodyFixupRule::MapStyleInto(nsIStyleContext* aContext, nsIPresContext* aPresContext)
|
||||
BodyFixupRule::MapStyleInto(nsIMutableStyleContext* aContext, nsIPresContext* aPresContext)
|
||||
{
|
||||
// XXX do any other body processing here
|
||||
|
||||
|
@ -640,7 +641,7 @@ nsHTMLBodyElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
if (nsnull != aAttributes) {
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
#include "nsIFormControl.h"
|
||||
|
@ -377,7 +378,7 @@ nsHTMLButtonElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aContext, aPresContext);
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
#include "nsIHTMLAttributes.h"
|
||||
|
@ -148,7 +149,7 @@ nsHTMLDListElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
if (nsnull != aAttributes) {
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
|
||||
|
@ -148,7 +149,7 @@ nsHTMLDelElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
// XXX write me
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
#include "nsIHTMLAttributes.h"
|
||||
|
@ -167,7 +168,7 @@ nsHTMLDirectoryElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
if (nsnull != aAttributes) {
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
#include "nsIHTMLAttributes.h"
|
||||
|
@ -172,7 +173,7 @@ nsHTMLDivElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
if (nsnull != aAttributes) {
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
|
||||
|
@ -162,7 +163,7 @@ nsHTMLEmbedElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
nsGenericHTMLElement::MapImageAlignAttributeInto(aAttributes, aContext, aPresContext);
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
#include "nsIForm.h"
|
||||
|
@ -237,7 +238,7 @@ nsHTMLFieldSetElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aContext, aPresContext);
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIDeviceContext.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsStyleUtil.h"
|
||||
#include "nsIPresContext.h"
|
||||
|
@ -191,7 +192,7 @@ nsHTMLFontElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapFontAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
if (nsnull != aAttributes) {
|
||||
|
@ -303,7 +304,7 @@ MapFontAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
if (nsnull != aAttributes) {
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
#include "nsIDocument.h"
|
||||
|
@ -401,7 +402,7 @@ nsHTMLFormElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
// XXX write me
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
|
||||
|
@ -204,7 +205,7 @@ nsHTMLFrameElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aContext, aPresContext);
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLIIDs.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIMutableStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresContext.h"
|
||||
|
||||
|
@ -167,7 +168,7 @@ nsHTMLFrameSetElement::AttributeToString(nsIAtom* aAttribute,
|
|||
|
||||
static void
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIMutableStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aContext, aPresContext);
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче