Remove unused (and sometimes buggy) DEBUG code. b=336323 r+sr=bzbarsky

git-svn-id: svn://10.0.0.236/trunk@195889 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
dbaron%dbaron.org
2006-05-03 04:26:28 +00:00
parent b1aa8897e6
commit a2628b4f7a
4 changed files with 0 additions and 781 deletions

View File

@@ -85,24 +85,6 @@ nsCSSFont::~nsCSSFont(void)
MOZ_COUNT_DTOR(nsCSSFont);
}
#ifdef DEBUG
void nsCSSFont::List(FILE* out, PRInt32 aIndent) const
{
for (PRInt32 index = aIndent; --index >= 0; ) fputs(" ", out);
nsAutoString buffer;
mFamily.AppendToString(buffer, eCSSProperty_font_family);
mStyle.AppendToString(buffer, eCSSProperty_font_style);
mVariant.AppendToString(buffer, eCSSProperty_font_variant);
mWeight.AppendToString(buffer, eCSSProperty_font_weight);
mSize.AppendToString(buffer, eCSSProperty_font_size);
mSizeAdjust.AppendToString(buffer, eCSSProperty_font_size_adjust);
mStretch.AppendToString(buffer, eCSSProperty_font_stretch);
fputs(NS_LossyConvertUTF16toASCII(buffer).get(), out);
}
#endif
// --- support -----------------
#define CSS_IF_COPY(val, type) \
@@ -171,27 +153,6 @@ nsCSSColor::~nsCSSColor(void)
MOZ_COUNT_DTOR(nsCSSColor);
}
#ifdef DEBUG
void nsCSSColor::List(FILE* out, PRInt32 aIndent) const
{
for (PRInt32 index = aIndent; --index >= 0; ) fputs(" ", out);
nsAutoString buffer;
mColor.AppendToString(buffer, eCSSProperty_color);
mBackColor.AppendToString(buffer, eCSSProperty_background_color);
mBackImage.AppendToString(buffer, eCSSProperty_background_image);
mBackRepeat.AppendToString(buffer, eCSSProperty_background_repeat);
mBackAttachment.AppendToString(buffer, eCSSProperty_background_attachment);
mBackPositionX.AppendToString(buffer, eCSSProperty_background_x_position);
mBackPositionY.AppendToString(buffer, eCSSProperty_background_y_position);
mBackClip.AppendToString(buffer, eCSSProperty__moz_background_clip);
mBackOrigin.AppendToString(buffer, eCSSProperty__moz_background_origin);
mBackInlinePolicy.AppendToString(buffer, eCSSProperty__moz_background_inline_policy);
fputs(NS_LossyConvertUTF16toASCII(buffer).get(), out);
}
#endif
// --- nsCSSText -----------------
nsCSSText::nsCSSText(void)
@@ -223,32 +184,6 @@ nsCSSText::~nsCSSText(void)
CSS_IF_DELETE(mTextShadow);
}
#ifdef DEBUG
void nsCSSText::List(FILE* out, PRInt32 aIndent) const
{
for (PRInt32 index = aIndent; --index >= 0; ) fputs(" ", out);
nsAutoString buffer;
mWordSpacing.AppendToString(buffer, eCSSProperty_word_spacing);
mLetterSpacing.AppendToString(buffer, eCSSProperty_letter_spacing);
mDecoration.AppendToString(buffer, eCSSProperty_text_decoration);
mVerticalAlign.AppendToString(buffer, eCSSProperty_vertical_align);
mTextTransform.AppendToString(buffer, eCSSProperty_text_transform);
mTextAlign.AppendToString(buffer, eCSSProperty_text_align);
mTextIndent.AppendToString(buffer, eCSSProperty_text_indent);
for (nsCSSValueList* shadow = mTextShadow; shadow; shadow = shadow->mNext) {
shadow->mValue.AppendToString(buffer, eCSSProperty_text_shadow);
}
mUnicodeBidi.AppendToString(buffer, eCSSProperty_unicode_bidi);
mLineHeight.AppendToString(buffer, eCSSProperty_line_height);
mWhiteSpace.AppendToString(buffer, eCSSProperty_white_space);
fputs(NS_LossyConvertUTF16toASCII(buffer).get(), out);
}
#endif
// --- nsCSSRect -----------------
nsCSSRect::nsCSSRect(void)
@@ -289,75 +224,6 @@ void nsCSSRect::SetAllSidesTo(const nsCSSValue& aValue)
&nsCSSRect::mLeft,
};
#ifdef DEBUG
void nsCSSRect::List(FILE* out, nsCSSProperty aPropID, PRInt32 aIndent) const
{
for (PRInt32 index = aIndent; --index >= 0; ) fputs(" ", out);
nsAutoString buffer;
if (eCSSProperty_UNKNOWN < aPropID) {
buffer.AppendWithConversion(nsCSSProps::GetStringValue(aPropID).get());
buffer.AppendLiteral(": ");
}
mTop.AppendToString(buffer);
mRight.AppendToString(buffer);
mBottom.AppendToString(buffer);
mLeft.AppendToString(buffer);
fputs(NS_LossyConvertUTF16toASCII(buffer).get(), out);
}
void nsCSSRect::List(FILE* out, PRInt32 aIndent, const nsCSSProperty aTRBL[]) const
{
for (PRInt32 index = aIndent; --index >= 0; ) fputs(" ", out);
nsAutoString buffer;
if (eCSSUnit_Null != mTop.GetUnit()) {
buffer.AppendWithConversion(nsCSSProps::GetStringValue(aTRBL[0]).get());
buffer.AppendLiteral(": ");
mTop.AppendToString(buffer);
}
if (eCSSUnit_Null != mRight.GetUnit()) {
buffer.AppendWithConversion(nsCSSProps::GetStringValue(aTRBL[1]).get());
buffer.AppendLiteral(": ");
mRight.AppendToString(buffer);
}
if (eCSSUnit_Null != mBottom.GetUnit()) {
buffer.AppendWithConversion(nsCSSProps::GetStringValue(aTRBL[2]).get());
buffer.AppendLiteral(": ");
mBottom.AppendToString(buffer);
}
if (eCSSUnit_Null != mLeft.GetUnit()) {
buffer.AppendWithConversion(nsCSSProps::GetStringValue(aTRBL[3]).get());
buffer.AppendLiteral(": ");
mLeft.AppendToString(buffer);
}
fputs(NS_LossyConvertUTF16toASCII(buffer).get(), out);
}
#endif
// --- nsCSSValuePair -------------------
#ifdef DEBUG
void nsCSSValuePair::AppendToString(nsAString& aString,
nsCSSProperty aPropName) const
{
if (mXValue.GetUnit() != eCSSUnit_Null) {
AppendUTF8toUTF16(nsCSSProps::GetStringValue(aPropName), aString);
aString.Append(NS_LITERAL_STRING(": "));
mXValue.AppendToString(aString);
NS_ASSERTION(mYValue.GetUnit() != eCSSUnit_Null,
nsPrintfCString("Parsed half of a %s?",
nsCSSProps::GetStringValue(aPropName).get()).get());
aString.Append(PRUnichar(' '));
mYValue.AppendToString(aString);
}
}
#endif
// --- nsCSSValueListRect -----------------
nsCSSValueListRect::nsCSSValueListRect(void)
@@ -391,60 +257,6 @@ nsCSSValueListRect::sides[4] = {
&nsCSSValueListRect::mLeft,
};
#ifdef DEBUG
void nsCSSValueListRect::List(FILE* out, nsCSSProperty aPropID, PRInt32 aIndent) const
{
#if 0
for (PRInt32 index = aIndent; --index >= 0; ) fputs(" ", out);
nsAutoString buffer;
if (eCSSProperty_UNKNOWN < aPropID) {
buffer.AppendWithConversion(nsCSSProps::GetStringValue(aPropID).get());
buffer.AppendLiteral(": ");
}
mTop.AppendToString(buffer);
mRight.AppendToString(buffer);
mBottom.AppendToString(buffer);
mLeft.AppendToString(buffer);
fputs(NS_LossyConvertUTF16toASCII(buffer).get(), out);
#endif
}
void nsCSSValueListRect::List(FILE* out, PRInt32 aIndent, const nsCSSProperty aTRBL[]) const
{
#if 0
for (PRInt32 index = aIndent; --index >= 0; ) fputs(" ", out);
nsAutoString buffer;
if (eCSSUnit_Null != mTop.GetUnit()) {
buffer.AppendWithConversion(nsCSSProps::GetStringValue(aTRBL[0]).get());
buffer.AppendLiteral(": ");
mTop.AppendToString(buffer);
}
if (eCSSUnit_Null != mRight.GetUnit()) {
buffer.AppendWithConversion(nsCSSProps::GetStringValue(aTRBL[1]).get());
buffer.AppendLiteral(": ");
mRight.AppendToString(buffer);
}
if (eCSSUnit_Null != mBottom.GetUnit()) {
buffer.AppendWithConversion(nsCSSProps::GetStringValue(aTRBL[2]).get());
buffer.AppendLiteral(": ");
mBottom.AppendToString(buffer);
}
if (eCSSUnit_Null != mLeft.GetUnit()) {
buffer.AppendWithConversion(nsCSSProps::GetStringValue(aTRBL[3]).get());
buffer.AppendLiteral(": ");
mLeft.AppendToString(buffer);
}
fputs(NS_LossyConvertUTF16toASCII(buffer).get(), out);
#endif
}
#endif
// --- nsCSSDisplay -----------------
nsCSSDisplay::nsCSSDisplay(void)
@@ -478,32 +290,6 @@ nsCSSDisplay::~nsCSSDisplay(void)
MOZ_COUNT_DTOR(nsCSSDisplay);
}
#ifdef DEBUG
void nsCSSDisplay::List(FILE* out, PRInt32 aIndent) const
{
for (PRInt32 index = aIndent; --index >= 0; ) fputs(" ", out);
nsAutoString buffer;
mAppearance.AppendToString(buffer, eCSSProperty_appearance);
mDirection.AppendToString(buffer, eCSSProperty_direction);
mDisplay.AppendToString(buffer, eCSSProperty_display);
mBinding.AppendToString(buffer, eCSSProperty_binding);
mPosition.AppendToString(buffer, eCSSProperty_position);
mFloat.AppendToString(buffer, eCSSProperty_float);
mClear.AppendToString(buffer, eCSSProperty_clear);
mVisibility.AppendToString(buffer, eCSSProperty_visibility);
mOpacity.AppendToString(buffer, eCSSProperty_opacity);
fputs(NS_LossyConvertUTF16toASCII(buffer).get(), out);
mClip.List(out, eCSSProperty_clip);
buffer.SetLength(0);
mOverflowX.AppendToString(buffer, eCSSProperty_overflow_x);
mOverflowY.AppendToString(buffer, eCSSProperty_overflow_y);
fputs(NS_LossyConvertUTF16toASCII(buffer).get(), out);
}
#endif
// --- nsCSSMargin -----------------
nsCSSMargin::nsCSSMargin(void)
@@ -546,69 +332,6 @@ nsCSSMargin::~nsCSSMargin(void)
MOZ_COUNT_DTOR(nsCSSMargin);
}
#ifdef DEBUG
void nsCSSMargin::List(FILE* out, PRInt32 aIndent) const
{
{
static const nsCSSProperty trbl[] = {
eCSSProperty_margin_top,
eCSSProperty_margin_right,
eCSSProperty_margin_bottom,
eCSSProperty_margin_left
};
mMargin.List(out, aIndent, trbl);
}
{
static const nsCSSProperty trbl[] = {
eCSSProperty_padding_top,
eCSSProperty_padding_right,
eCSSProperty_padding_bottom,
eCSSProperty_padding_left
};
mPadding.List(out, aIndent, trbl);
}
{
static const nsCSSProperty trbl[] = {
eCSSProperty_border_top_width,
eCSSProperty_border_right_width,
eCSSProperty_border_bottom_width,
eCSSProperty_border_left_width
};
mBorderWidth.List(out, aIndent, trbl);
}
mBorderColor.List(out, eCSSProperty_border_color, aIndent);
mBorderStyle.List(out, eCSSProperty_border_style, aIndent);
{
static const nsCSSProperty trbl[] = {
eCSSProperty__moz_border_radius_topLeft,
eCSSProperty__moz_border_radius_topRight,
eCSSProperty__moz_border_radius_bottomRight,
eCSSProperty__moz_border_radius_bottomLeft
};
mBorderRadius.List(out, aIndent, trbl);
}
for (PRInt32 index = aIndent; --index >= 0; ) fputs(" ", out);
nsAutoString buffer;
mOutlineWidth.AppendToString(buffer, eCSSProperty_outline_width);
mOutlineColor.AppendToString(buffer, eCSSProperty_outline_color);
mOutlineOffset.AppendToString(buffer, eCSSProperty_outline_offset);
mOutlineStyle.AppendToString(buffer, eCSSProperty_outline_style);
{
static const nsCSSProperty trbl[] = {
eCSSProperty__moz_outline_radius_topLeft,
eCSSProperty__moz_outline_radius_topRight,
eCSSProperty__moz_outline_radius_bottomRight,
eCSSProperty__moz_outline_radius_bottomLeft
};
mOutlineRadius.List(out, aIndent, trbl);
}
mFloatEdge.AppendToString(buffer, eCSSProperty_float_edge);
fputs(NS_LossyConvertUTF16toASCII(buffer).get(), out);
}
#endif
// --- nsCSSPosition -----------------
nsCSSPosition::nsCSSPosition(void)
@@ -635,33 +358,6 @@ nsCSSPosition::~nsCSSPosition(void)
MOZ_COUNT_DTOR(nsCSSPosition);
}
#ifdef DEBUG
void nsCSSPosition::List(FILE* out, PRInt32 aIndent) const
{
for (PRInt32 index = aIndent; --index >= 0; ) fputs(" ", out);
nsAutoString buffer;
mWidth.AppendToString(buffer, eCSSProperty_width);
mMinWidth.AppendToString(buffer, eCSSProperty_min_width);
mMaxWidth.AppendToString(buffer, eCSSProperty_max_width);
mHeight.AppendToString(buffer, eCSSProperty_height);
mMinHeight.AppendToString(buffer, eCSSProperty_min_height);
mMaxHeight.AppendToString(buffer, eCSSProperty_max_height);
mBoxSizing.AppendToString(buffer, eCSSProperty_box_sizing);
mZIndex.AppendToString(buffer, eCSSProperty_z_index);
fputs(NS_LossyConvertUTF16toASCII(buffer).get(), out);
static const nsCSSProperty trbl[] = {
eCSSProperty_top,
eCSSProperty_right,
eCSSProperty_bottom,
eCSSProperty_left
};
mOffset.List(out, aIndent, trbl);
}
#endif
// --- nsCSSList -----------------
nsCSSList::nsCSSList(void)
@@ -683,28 +379,6 @@ nsCSSList::~nsCSSList(void)
MOZ_COUNT_DTOR(nsCSSList);
}
#ifdef DEBUG
void nsCSSList::List(FILE* out, PRInt32 aIndent) const
{
for (PRInt32 index = aIndent; --index >= 0; ) fputs(" ", out);
nsAutoString buffer;
mType.AppendToString(buffer, eCSSProperty_list_style_type);
mImage.AppendToString(buffer, eCSSProperty_list_style_image);
mPosition.AppendToString(buffer, eCSSProperty_list_style_position);
fputs(NS_LossyConvertUTF16toASCII(buffer).get(), out);
static const nsCSSProperty trbl[] = {
eCSSProperty_top,
eCSSProperty_right,
eCSSProperty_bottom,
eCSSProperty_left
};
mImageRegion.List(out, aIndent, trbl);
}
#endif
// --- nsCSSTable -----------------
nsCSSTable::nsCSSTable(void)
@@ -727,23 +401,6 @@ nsCSSTable::~nsCSSTable(void)
MOZ_COUNT_DTOR(nsCSSTable);
}
#ifdef DEBUG
void nsCSSTable::List(FILE* out, PRInt32 aIndent) const
{
for (PRInt32 index = aIndent; --index >= 0; ) fputs(" ", out);
nsAutoString buffer;
mBorderCollapse.AppendToString(buffer, eCSSProperty_border_collapse);
mBorderSpacing.AppendToString(buffer, eCSSProperty_border_spacing);
mCaptionSide.AppendToString(buffer, eCSSProperty_caption_side);
mEmptyCells.AppendToString(buffer, eCSSProperty_empty_cells);
mLayout.AppendToString(buffer, eCSSProperty_table_layout);
fputs(NS_LossyConvertUTF16toASCII(buffer).get(), out);
}
#endif
// --- nsCSSBreaks -----------------
nsCSSBreaks::nsCSSBreaks(void)
@@ -768,25 +425,6 @@ nsCSSBreaks::~nsCSSBreaks(void)
MOZ_COUNT_DTOR(nsCSSBreaks);
}
#ifdef DEBUG
void nsCSSBreaks::List(FILE* out, PRInt32 aIndent) const
{
for (PRInt32 index = aIndent; --index >= 0; ) fputs(" ", out);
nsAutoString buffer;
mOrphans.AppendToString(buffer, eCSSProperty_orphans);
mWidows.AppendToString(buffer, eCSSProperty_widows);
mPage.AppendToString(buffer, eCSSProperty_page);
// temp fix for bug 24000
//mPageBreakAfter.AppendToString(buffer, eCSSProperty_page_break_after);
//mPageBreakBefore.AppendToString(buffer, eCSSProperty_page_break_before);
mPageBreakInside.AppendToString(buffer, eCSSProperty_page_break_inside);
fputs(NS_LossyConvertUTF16toASCII(buffer).get(), out);
}
#endif
// --- nsCSSPage -----------------
nsCSSPage::nsCSSPage(void)
@@ -806,20 +444,6 @@ nsCSSPage::~nsCSSPage(void)
MOZ_COUNT_DTOR(nsCSSPage);
}
#ifdef DEBUG
void nsCSSPage::List(FILE* out, PRInt32 aIndent) const
{
for (PRInt32 index = aIndent; --index >= 0; ) fputs(" ", out);
nsAutoString buffer;
mMarks.AppendToString(buffer, eCSSProperty_marks);
mSize.AppendToString(buffer, eCSSProperty_size);
fputs(NS_LossyConvertUTF16toASCII(buffer).get(), out);
}
#endif
// --- nsCSSContent support -----------------
nsCSSCounterData::nsCSSCounterData(void)
@@ -928,43 +552,6 @@ nsCSSContent::~nsCSSContent(void)
CSS_IF_DELETE(mQuotes);
}
#ifdef DEBUG
void nsCSSContent::List(FILE* out, PRInt32 aIndent) const
{
for (PRInt32 index = aIndent; --index >= 0; ) fputs(" ", out);
nsAutoString buffer;
nsCSSValueList* content = mContent;
while (nsnull != content) {
content->mValue.AppendToString(buffer, eCSSProperty_content);
content = content->mNext;
}
nsCSSCounterData* counter = mCounterIncrement;
while (nsnull != counter) {
counter->mCounter.AppendToString(buffer, eCSSProperty_counter_increment);
counter->mValue.AppendToString(buffer, eCSSProperty_UNKNOWN);
counter = counter->mNext;
}
counter = mCounterReset;
while (nsnull != counter) {
counter->mCounter.AppendToString(buffer, eCSSProperty_counter_reset);
counter->mValue.AppendToString(buffer, eCSSProperty_UNKNOWN);
counter = counter->mNext;
}
mMarkerOffset.AppendToString(buffer, eCSSProperty_marker_offset);
// XXX This prints the property name many times, but nobody cares.
nsCSSQuotes* quotes = mQuotes;
while (nsnull != quotes) {
quotes->mOpen.AppendToString(buffer, eCSSProperty_quotes);
quotes->mClose.AppendToString(buffer, eCSSProperty_quotes);
quotes = quotes->mNext;
}
fputs(NS_LossyConvertUTF16toASCII(buffer).get(), out);
}
#endif
// --- nsCSSUserInterface -----------------
nsCSSUserInterface::nsCSSUserInterface(void)
@@ -991,30 +578,6 @@ nsCSSUserInterface::~nsCSSUserInterface(void)
CSS_IF_DELETE(mCursor);
}
#ifdef DEBUG
void nsCSSUserInterface::List(FILE* out, PRInt32 aIndent) const
{
for (PRInt32 index = aIndent; --index >= 0; ) fputs(" ", out);
nsAutoString buffer;
mUserInput.AppendToString(buffer, eCSSProperty_user_input);
mUserModify.AppendToString(buffer, eCSSProperty_user_modify);
mUserSelect.AppendToString(buffer, eCSSProperty_user_select);
mUserFocus.AppendToString(buffer, eCSSProperty_user_focus);
nsCSSValueList* cursor = mCursor;
while (nsnull != cursor) {
cursor->mValue.AppendToString(buffer, eCSSProperty_cursor);
cursor = cursor->mNext;
}
mForceBrokenImageIcon.AppendToString(buffer,eCSSProperty_force_broken_image_icon);
fputs(NS_LossyConvertUTF16toASCII(buffer).get(), out);
}
#endif
// --- nsCSSAural -----------------
nsCSSAural::nsCSSAural(void)
@@ -1049,35 +612,6 @@ nsCSSAural::~nsCSSAural(void)
MOZ_COUNT_DTOR(nsCSSAural);
}
#ifdef DEBUG
void nsCSSAural::List(FILE* out, PRInt32 aIndent) const
{
for (PRInt32 index = aIndent; --index >= 0; ) fputs(" ", out);
nsAutoString buffer;
mAzimuth.AppendToString(buffer, eCSSProperty_azimuth);
mElevation.AppendToString(buffer, eCSSProperty_elevation);
mCueAfter.AppendToString(buffer, eCSSProperty_cue_after);
mCueBefore.AppendToString(buffer, eCSSProperty_cue_before);
mPauseAfter.AppendToString(buffer, eCSSProperty_pause_after);
mPauseBefore.AppendToString(buffer, eCSSProperty_pause_before);
mPitch.AppendToString(buffer, eCSSProperty_pitch);
mPitchRange.AppendToString(buffer, eCSSProperty_pitch_range);
mRichness.AppendToString(buffer, eCSSProperty_richness);
mSpeak.AppendToString(buffer, eCSSProperty_speak);
mSpeakHeader.AppendToString(buffer, eCSSProperty_speak_header);
mSpeakNumeral.AppendToString(buffer, eCSSProperty_speak_numeral);
mSpeakPunctuation.AppendToString(buffer, eCSSProperty_speak_punctuation);
mSpeechRate.AppendToString(buffer, eCSSProperty_speech_rate);
mStress.AppendToString(buffer, eCSSProperty_stress);
mVoiceFamily.AppendToString(buffer, eCSSProperty_voice_family);
mVolume.AppendToString(buffer, eCSSProperty_volume);
fputs(NS_LossyConvertUTF16toASCII(buffer).get(), out);
}
#endif
// --- nsCSSXUL -----------------
nsCSSXUL::nsCSSXUL(void)
@@ -1098,23 +632,6 @@ nsCSSXUL::~nsCSSXUL(void)
MOZ_COUNT_DTOR(nsCSSXUL);
}
#ifdef DEBUG
void nsCSSXUL::List(FILE* out, PRInt32 aIndent) const
{
for (PRInt32 index = aIndent; --index >= 0; ) fputs(" ", out);
nsAutoString buffer;
mBoxAlign.AppendToString(buffer, eCSSProperty_box_align);
mBoxDirection.AppendToString(buffer, eCSSProperty_box_direction);
mBoxFlex.AppendToString(buffer, eCSSProperty_box_flex);
mBoxOrient.AppendToString(buffer, eCSSProperty_box_orient);
mBoxPack.AppendToString(buffer, eCSSProperty_box_pack);
mBoxOrdinal.AppendToString(buffer, eCSSProperty_box_ordinal_group);
fputs(NS_LossyConvertUTF16toASCII(buffer).get(), out);
}
#endif
// --- nsCSSColumn -----------------
nsCSSColumn::nsCSSColumn(void)
@@ -1134,20 +651,6 @@ nsCSSColumn::~nsCSSColumn(void)
MOZ_COUNT_DTOR(nsCSSColumn);
}
#ifdef DEBUG
void nsCSSColumn::List(FILE* out, PRInt32 aIndent) const
{
for (PRInt32 index = aIndent; --index >= 0; ) fputs(" ", out);
nsAutoString buffer;
mColumnWidth.AppendToString(buffer, eCSSProperty__moz_column_width);
mColumnGap.AppendToString(buffer, eCSSProperty__moz_column_gap);
mColumnCount.AppendToString(buffer, eCSSProperty__moz_column_count);
fputs(NS_LossyConvertUTF16toASCII(buffer).get(), out);
}
#endif
#ifdef MOZ_SVG
// --- nsCSSSVG -----------------
@@ -1193,49 +696,4 @@ nsCSSSVG::~nsCSSSVG(void)
CSS_IF_DELETE(mStrokeDasharray);
}
#ifdef DEBUG
void nsCSSSVG::List(FILE* out, PRInt32 aIndent) const
{
for (PRInt32 index = aIndent; --index >= 0; ) fputs(" ", out);
nsAutoString buffer;
mClipPath.AppendToString(buffer, eCSSProperty_clip_path);
mClipRule.AppendToString(buffer, eCSSProperty_clip_rule);
mDominantBaseline.AppendToString(buffer, eCSSProperty_dominant_baseline);
mFill.AppendToString(buffer, eCSSProperty_fill);
mFillOpacity.AppendToString(buffer, eCSSProperty_fill_opacity);
mFillRule.AppendToString(buffer, eCSSProperty_fill_rule);
mFilter.AppendToString(buffer, eCSSProperty_filter);
mMarkerEnd.AppendToString(buffer, eCSSProperty_marker_end);
mMarkerMid.AppendToString(buffer, eCSSProperty_marker_mid);
mMarkerStart.AppendToString(buffer, eCSSProperty_marker_start);
mMask.AppendToString(buffer, eCSSProperty_mask);
mPointerEvents.AppendToString(buffer, eCSSProperty_pointer_events);
mShapeRendering.AppendToString(buffer, eCSSProperty_shape_rendering);
mStopColor.AppendToString(buffer, eCSSProperty_stop_color);
mStopOpacity.AppendToString(buffer, eCSSProperty_stop_opacity);
mStroke.AppendToString(buffer, eCSSProperty_stroke);
// XXX This prints the property name many times, but nobody cares.
nsCSSValueList *value = mStrokeDasharray;
while (value) {
value->mValue.AppendToString(buffer, eCSSProperty_stroke_dasharray);
value = value->mNext;
if (value)
buffer.AppendLiteral(",");
}
mStrokeDashoffset.AppendToString(buffer, eCSSProperty_stroke_dashoffset);
mStrokeLinecap.AppendToString(buffer, eCSSProperty_stroke_linecap);
mStrokeLinejoin.AppendToString(buffer, eCSSProperty_stroke_linejoin);
mStrokeMiterlimit.AppendToString(buffer, eCSSProperty_stroke_miterlimit);
mStrokeOpacity.AppendToString(buffer, eCSSProperty_stroke_opacity);
mStrokeWidth.AppendToString(buffer, eCSSProperty_stroke_width);
mTextAnchor.AppendToString(buffer, eCSSProperty_text_anchor);
mTextRendering.AppendToString(buffer, eCSSProperty_text_rendering);
fputs(NS_LossyConvertUTF16toASCII(buffer).get(), out);
}
#endif
#endif // MOZ_SVG

View File

@@ -67,9 +67,6 @@ struct nsCSSFont : public nsCSSStruct {
nsCSSFont(void);
nsCSSFont(const nsCSSFont& aCopy);
~nsCSSFont(void);
#ifdef DEBUG
void List(FILE* out = stdout, PRInt32 aIndent = 0) const;
#endif
nsCSSValue mFamily;
nsCSSValue mStyle;
@@ -100,9 +97,6 @@ struct nsCSSColor : public nsCSSStruct {
nsCSSColor(void);
nsCSSColor(const nsCSSColor& aCopy);
~nsCSSColor(void);
#ifdef DEBUG
void List(FILE* out = stdout, PRInt32 aIndent = 0) const;
#endif
nsCSSValue mColor;
nsCSSValue mBackColor;
@@ -124,10 +118,6 @@ struct nsCSSText : public nsCSSStruct {
nsCSSText(const nsCSSText& aCopy);
~nsCSSText(void);
#ifdef DEBUG
void List(FILE* out = stdout, PRInt32 aIndent = 0) const;
#endif
nsCSSValue mWordSpacing;
nsCSSValue mLetterSpacing;
nsCSSValue mVerticalAlign;
@@ -148,10 +138,6 @@ struct nsCSSRect {
nsCSSRect(void);
nsCSSRect(const nsCSSRect& aCopy);
~nsCSSRect();
#ifdef DEBUG
void List(FILE* out = 0, nsCSSProperty aPropID = eCSSProperty_UNKNOWN, PRInt32 aIndent = 0) const;
void List(FILE* out, PRInt32 aIndent, const nsCSSProperty aTRBL[]) const;
#endif
PRBool operator==(const nsCSSRect& aOther) const {
return mTop == aOther.mTop &&
@@ -224,10 +210,6 @@ struct nsCSSValuePair {
mYValue = aValue;
}
#ifdef DEBUG
void AppendToString(nsAString& aString, nsCSSProperty aPropName) const;
#endif
nsCSSValue mXValue;
nsCSSValue mYValue;
};
@@ -236,10 +218,6 @@ struct nsCSSValueListRect {
nsCSSValueListRect(void);
nsCSSValueListRect(const nsCSSValueListRect& aCopy);
~nsCSSValueListRect();
#ifdef DEBUG
void List(FILE* out = 0, nsCSSProperty aPropID = eCSSProperty_UNKNOWN, PRInt32 aIndent = 0) const;
void List(FILE* out, PRInt32 aIndent, const nsCSSProperty aTRBL[]) const;
#endif
nsCSSValueList* mTop;
nsCSSValueList* mRight;
@@ -255,10 +233,6 @@ struct nsCSSDisplay : public nsCSSStruct {
nsCSSDisplay(const nsCSSDisplay& aCopy);
~nsCSSDisplay(void);
#ifdef DEBUG
void List(FILE* out = stdout, PRInt32 aIndent = 0) const;
#endif
nsCSSValue mDirection;
nsCSSValue mDisplay;
nsCSSValue mBinding;
@@ -287,10 +261,6 @@ struct nsCSSMargin : public nsCSSStruct {
nsCSSMargin(const nsCSSMargin& aCopy);
~nsCSSMargin(void);
#ifdef DEBUG
void List(FILE* out = stdout, PRInt32 aIndent = 0) const;
#endif
nsCSSRect mMargin;
nsCSSValue mMarginStart;
nsCSSValue mMarginEnd;
@@ -326,10 +296,6 @@ struct nsCSSPosition : public nsCSSStruct {
nsCSSPosition(const nsCSSPosition& aCopy);
~nsCSSPosition(void);
#ifdef DEBUG
void List(FILE* out = stdout, PRInt32 aIndent = 0) const;
#endif
nsCSSValue mWidth;
nsCSSValue mMinWidth;
nsCSSValue mMaxWidth;
@@ -349,10 +315,6 @@ struct nsCSSList : public nsCSSStruct {
nsCSSList(const nsCSSList& aCopy);
~nsCSSList(void);
#ifdef DEBUG
void List(FILE* out = stdout, PRInt32 aIndent = 0) const;
#endif
nsCSSValue mType;
nsCSSValue mImage;
nsCSSValue mPosition;
@@ -367,10 +329,6 @@ struct nsCSSTable : public nsCSSStruct { // NEW
nsCSSTable(const nsCSSTable& aCopy);
~nsCSSTable(void);
#ifdef DEBUG
void List(FILE* out = stdout, PRInt32 aIndent = 0) const;
#endif
nsCSSValue mBorderCollapse;
nsCSSValuePair mBorderSpacing;
nsCSSValue mCaptionSide;
@@ -391,10 +349,6 @@ struct nsCSSBreaks : public nsCSSStruct { // NEW
nsCSSBreaks(const nsCSSBreaks& aCopy);
~nsCSSBreaks(void);
#ifdef DEBUG
void List(FILE* out = stdout, PRInt32 aIndent = 0) const;
#endif
nsCSSValue mOrphans;
nsCSSValue mWidows;
nsCSSValue mPage;
@@ -412,10 +366,6 @@ struct nsCSSPage : public nsCSSStruct { // NEW
nsCSSPage(const nsCSSPage& aCopy);
~nsCSSPage(void);
#ifdef DEBUG
void List(FILE* out = stdout, PRInt32 aIndent = 0) const;
#endif
nsCSSValue mMarks;
nsCSSValuePair mSize;
};
@@ -454,10 +404,6 @@ struct nsCSSContent : public nsCSSStruct {
nsCSSContent(const nsCSSContent& aCopy);
~nsCSSContent(void);
#ifdef DEBUG
void List(FILE* out = stdout, PRInt32 aIndent = 0) const;
#endif
nsCSSValueList* mContent;
nsCSSCounterData* mCounterIncrement;
nsCSSCounterData* mCounterReset;
@@ -473,10 +419,6 @@ struct nsCSSUserInterface : public nsCSSStruct { // NEW
nsCSSUserInterface(const nsCSSUserInterface& aCopy);
~nsCSSUserInterface(void);
#ifdef DEBUG
void List(FILE* out = stdout, PRInt32 aIndent = 0) const;
#endif
nsCSSValue mUserInput;
nsCSSValue mUserModify;
nsCSSValue mUserSelect;
@@ -494,10 +436,6 @@ struct nsCSSAural : public nsCSSStruct { // NEW
nsCSSAural(const nsCSSAural& aCopy);
~nsCSSAural(void);
#ifdef DEBUG
void List(FILE* out = stdout, PRInt32 aIndent = 0) const;
#endif
nsCSSValue mAzimuth;
nsCSSValue mElevation;
nsCSSValue mCueAfter;
@@ -526,10 +464,6 @@ struct nsCSSXUL : public nsCSSStruct {
nsCSSXUL(const nsCSSXUL& aCopy);
~nsCSSXUL(void);
#ifdef DEBUG
void List(FILE* out = stdout, PRInt32 aIndent = 0) const;
#endif
nsCSSValue mBoxAlign;
nsCSSValue mBoxDirection;
nsCSSValue mBoxFlex;
@@ -546,10 +480,6 @@ struct nsCSSColumn : public nsCSSStruct {
nsCSSColumn(const nsCSSColumn& aCopy);
~nsCSSColumn(void);
#ifdef DEBUG
void List(FILE* out = stdout, PRInt32 aIndent = 0) const;
#endif
nsCSSValue mColumnCount;
nsCSSValue mColumnWidth;
nsCSSValue mColumnGap;
@@ -564,10 +494,6 @@ struct nsCSSSVG : public nsCSSStruct {
nsCSSSVG(const nsCSSSVG& aCopy);
~nsCSSSVG(void);
#ifdef DEBUG
void List(FILE* out = stdout, PRInt32 aIndent = 0) const;
#endif
nsCSSValue mClipPath;
nsCSSValue mClipRule;
nsCSSValue mDominantBaseline;

View File

@@ -405,154 +405,3 @@ nsCSSValue::Image::~Image()
{
MOZ_COUNT_DTOR(nsCSSValue::Image);
}
#ifdef DEBUG
void nsCSSValue::AppendToString(nsAString& aBuffer,
nsCSSProperty aPropID) const
{
if (eCSSUnit_Null == mUnit) {
return;
}
if (-1 < aPropID) {
AppendASCIItoUTF16(nsCSSProps::GetStringValue(aPropID), aBuffer);
aBuffer.AppendLiteral(": ");
}
switch (mUnit) {
case eCSSUnit_Image:
case eCSSUnit_URL: aBuffer.AppendLiteral("url("); break;
case eCSSUnit_Attr: aBuffer.AppendLiteral("attr("); break;
case eCSSUnit_Counter: aBuffer.AppendLiteral("counter("); break;
case eCSSUnit_Counters: aBuffer.AppendLiteral("counters("); break;
default: break;
}
if ((eCSSUnit_String <= mUnit) && (mUnit <= eCSSUnit_Attr)) {
if (nsnull != mValue.mString) {
aBuffer.Append(PRUnichar('"'));
aBuffer.Append(mValue.mString);
aBuffer.Append(PRUnichar('"'));
}
else {
aBuffer.AppendLiteral("null str");
}
}
else if ((eCSSUnit_Integer <= mUnit) && (mUnit <= eCSSUnit_Enumerated)) {
nsAutoString intStr;
intStr.AppendInt(mValue.mInt, 10);
aBuffer.Append(intStr);
aBuffer.AppendLiteral("[0x");
intStr.Truncate();
intStr.AppendInt(mValue.mInt, 16);
aBuffer.Append(intStr);
aBuffer.Append(PRUnichar(']'));
}
else if (eCSSUnit_Color == mUnit) {
aBuffer.AppendLiteral("(0x");
nsAutoString intStr;
intStr.AppendInt(NS_GET_R(mValue.mColor), 16);
aBuffer.Append(intStr);
aBuffer.AppendLiteral(" 0x");
intStr.Truncate();
intStr.AppendInt(NS_GET_G(mValue.mColor), 16);
aBuffer.Append(intStr);
aBuffer.AppendLiteral(" 0x");
intStr.Truncate();
intStr.AppendInt(NS_GET_B(mValue.mColor), 16);
aBuffer.Append(intStr);
aBuffer.AppendLiteral(" 0x");
intStr.Truncate();
intStr.AppendInt(NS_GET_A(mValue.mColor), 16);
aBuffer.Append(intStr);
aBuffer.Append(PRUnichar(')'));
}
else if (eCSSUnit_Array <= mUnit && mUnit <= eCSSUnit_Counters) {
for (PRUint16 i = 0, i_end = mValue.mArray->Count(); i != i_end; ++i) {
(*mValue.mArray)[i].AppendToString(aBuffer, aPropID);
}
}
else if (eCSSUnit_URL == mUnit) {
aBuffer.Append(mValue.mURL->mString);
}
else if (eCSSUnit_Image == mUnit) {
aBuffer.Append(mValue.mImage->mString);
}
else if (eCSSUnit_Percent == mUnit) {
nsAutoString floatString;
floatString.AppendFloat(mValue.mFloat * 100.0f);
aBuffer.Append(floatString);
}
else if (eCSSUnit_Percent < mUnit) {
nsAutoString floatString;
floatString.AppendFloat(mValue.mFloat);
aBuffer.Append(floatString);
}
switch (mUnit) {
case eCSSUnit_Null: break;
case eCSSUnit_Auto: aBuffer.AppendLiteral("auto"); break;
case eCSSUnit_Inherit: aBuffer.AppendLiteral("inherit"); break;
case eCSSUnit_Initial: aBuffer.AppendLiteral("-moz-initial"); break;
case eCSSUnit_None: aBuffer.AppendLiteral("none"); break;
case eCSSUnit_Normal: aBuffer.AppendLiteral("normal"); break;
case eCSSUnit_Array:
case eCSSUnit_String: break;
case eCSSUnit_URL:
case eCSSUnit_Image:
case eCSSUnit_Attr:
case eCSSUnit_Counter:
case eCSSUnit_Counters: aBuffer.Append(NS_LITERAL_STRING(")")); break;
case eCSSUnit_Integer: aBuffer.AppendLiteral("int"); break;
case eCSSUnit_Enumerated: aBuffer.AppendLiteral("enum"); break;
case eCSSUnit_Color: aBuffer.AppendLiteral("rbga"); break;
case eCSSUnit_Percent: aBuffer.AppendLiteral("%"); break;
case eCSSUnit_Number: aBuffer.AppendLiteral("#"); break;
case eCSSUnit_Inch: aBuffer.AppendLiteral("in"); break;
case eCSSUnit_Foot: aBuffer.AppendLiteral("ft"); break;
case eCSSUnit_Mile: aBuffer.AppendLiteral("mi"); break;
case eCSSUnit_Millimeter: aBuffer.AppendLiteral("mm"); break;
case eCSSUnit_Centimeter: aBuffer.AppendLiteral("cm"); break;
case eCSSUnit_Meter: aBuffer.AppendLiteral("m"); break;
case eCSSUnit_Kilometer: aBuffer.AppendLiteral("km"); break;
case eCSSUnit_Point: aBuffer.AppendLiteral("pt"); break;
case eCSSUnit_Pica: aBuffer.AppendLiteral("pc"); break;
case eCSSUnit_Didot: aBuffer.AppendLiteral("dt"); break;
case eCSSUnit_Cicero: aBuffer.AppendLiteral("cc"); break;
case eCSSUnit_EM: aBuffer.AppendLiteral("em"); break;
case eCSSUnit_EN: aBuffer.AppendLiteral("en"); break;
case eCSSUnit_XHeight: aBuffer.AppendLiteral("ex"); break;
case eCSSUnit_CapHeight: aBuffer.AppendLiteral("cap"); break;
case eCSSUnit_Char: aBuffer.AppendLiteral("ch"); break;
case eCSSUnit_Pixel: aBuffer.AppendLiteral("px"); break;
case eCSSUnit_Proportional: aBuffer.AppendLiteral("*"); break;
case eCSSUnit_Degree: aBuffer.AppendLiteral("deg"); break;
case eCSSUnit_Grad: aBuffer.AppendLiteral("grad"); break;
case eCSSUnit_Radian: aBuffer.AppendLiteral("rad"); break;
case eCSSUnit_Hertz: aBuffer.AppendLiteral("Hz"); break;
case eCSSUnit_Kilohertz: aBuffer.AppendLiteral("kHz"); break;
case eCSSUnit_Seconds: aBuffer.AppendLiteral("s"); break;
case eCSSUnit_Milliseconds: aBuffer.AppendLiteral("ms"); break;
}
aBuffer.AppendLiteral(" ");
}
void nsCSSValue::ToString(nsAString& aBuffer,
nsCSSProperty aPropID) const
{
aBuffer.Truncate();
AppendToString(aBuffer, aPropID);
}
#endif /* defined(DEBUG) */

View File

@@ -281,20 +281,6 @@ public:
PRBool aIsBGImage = PR_FALSE)
const; // Not really const, but pretending
#ifdef DEBUG
// XXX This is buggy and should have its contents replaced with
// nsCSSDeclaration::AppendCSSValueToString (and the optional
// parameter dropped). (Probably easier to do after making
// nsCSSStruct List methods be table-driven, since this function
// appends more than just the value.)
NS_HIDDEN_(void)
AppendToString(nsAString& aBuffer,
nsCSSProperty aPropID = eCSSProperty_UNKNOWN) const;
NS_HIDDEN_(void)
ToString(nsAString& aBuffer,
nsCSSProperty aPropID = eCSSProperty_UNKNOWN) const;
#endif
struct Array {
// return |Array| with reference count of zero