diff --git a/mozilla/content/html/style/src/nsCSSDeclaration.cpp b/mozilla/content/html/style/src/nsCSSDeclaration.cpp index d38ee70f5a4..02269ec745a 100644 --- a/mozilla/content/html/style/src/nsCSSDeclaration.cpp +++ b/mozilla/content/html/style/src/nsCSSDeclaration.cpp @@ -550,9 +550,9 @@ void nsCSSMargin::List(FILE* out, PRInt32 aIndent) const for (PRInt32 index = aIndent; --index >= 0; ) fputs(" ", out); nsAutoString buffer; - mOutlineWidth.AppendToString(buffer, eCSSProperty_outline_width); - mOutlineColor.AppendToString(buffer, eCSSProperty_outline_color); - mOutlineStyle.AppendToString(buffer, eCSSProperty_outline_style); + mOutlineWidth.AppendToString(buffer, eCSSProperty__moz_outline_width); + mOutlineColor.AppendToString(buffer, eCSSProperty__moz_outline_color); + mOutlineStyle.AppendToString(buffer, eCSSProperty__moz_outline_style); if (nsnull != mOutlineRadius) { static const nsCSSProperty trbl[] = { eCSSProperty__moz_outline_radius_topLeft, @@ -912,13 +912,13 @@ void nsCSSContent::List(FILE* out, PRInt32 aIndent) const } nsCSSCounterData* counter = mCounterIncrement; while (nsnull != counter) { - counter->mCounter.AppendToString(buffer, eCSSProperty_counter_increment); + counter->mCounter.AppendToString(buffer, eCSSProperty__moz_counter_increment); counter->mValue.AppendToString(buffer, eCSSProperty_UNKNOWN); counter = counter->mNext; } counter = mCounterReset; while (nsnull != counter) { - counter->mCounter.AppendToString(buffer, eCSSProperty_counter_reset); + counter->mCounter.AppendToString(buffer, eCSSProperty__moz_counter_reset); counter->mValue.AppendToString(buffer, eCSSProperty_UNKNOWN); counter = counter->mNext; } @@ -1711,15 +1711,15 @@ nsCSSDeclaration::AppendValue(nsCSSProperty aProperty, const nsCSSValue& aValue) break; } - case eCSSProperty_outline_width: - case eCSSProperty_outline_color: - case eCSSProperty_outline_style: + case eCSSProperty__moz_outline_width: + case eCSSProperty__moz_outline_color: + case eCSSProperty__moz_outline_style: case eCSSProperty_float_edge: { CSS_ENSURE(Margin) { switch (aProperty) { - case eCSSProperty_outline_width: theMargin->mOutlineWidth = aValue; break; - case eCSSProperty_outline_color: theMargin->mOutlineColor = aValue; break; - case eCSSProperty_outline_style: theMargin->mOutlineStyle = aValue; break; + case eCSSProperty__moz_outline_width: theMargin->mOutlineWidth = aValue; break; + case eCSSProperty__moz_outline_color: theMargin->mOutlineColor = aValue; break; + case eCSSProperty__moz_outline_style: theMargin->mOutlineStyle = aValue; break; case eCSSProperty_float_edge: theMargin->mFloatEdge = aValue; break; CSS_BOGUS_DEFAULT; // make compiler happy } @@ -1870,8 +1870,8 @@ nsCSSDeclaration::AppendValue(nsCSSProperty aProperty, const nsCSSValue& aValue) // nsCSSContent case eCSSProperty_content: - case eCSSProperty_counter_increment: - case eCSSProperty_counter_reset: + case eCSSProperty__moz_counter_increment: + case eCSSProperty__moz_counter_reset: case eCSSProperty_marker_offset: case eCSSProperty_quotes_open: case eCSSProperty_quotes_close: { @@ -1883,13 +1883,13 @@ nsCSSDeclaration::AppendValue(nsCSSProperty aProperty, const nsCSSValue& aValue) CSS_IF_DELETE(theContent->mContent->mNext); } break; - case eCSSProperty_counter_increment: + case eCSSProperty__moz_counter_increment: CSS_ENSURE_DATA(theContent->mCounterIncrement, nsCSSCounterData) { theContent->mCounterIncrement->mCounter = aValue; CSS_IF_DELETE(theContent->mCounterIncrement->mNext); } break; - case eCSSProperty_counter_reset: + case eCSSProperty__moz_counter_reset: CSS_ENSURE_DATA(theContent->mCounterReset, nsCSSCounterData) { theContent->mCounterReset->mCounter = aValue; CSS_IF_DELETE(theContent->mCounterReset->mNext); @@ -2066,7 +2066,7 @@ nsCSSDeclaration::AppendValue(nsCSSProperty aProperty, const nsCSSValue& aValue) case eCSSProperty_image_region: case eCSSProperty_list_style: case eCSSProperty_margin: - case eCSSProperty_outline: + case eCSSProperty__moz_outline: case eCSSProperty_padding: case eCSSProperty_pause: case eCSSProperty_quotes: @@ -2138,7 +2138,7 @@ nsCSSDeclaration::AppendStructValue(nsCSSProperty aProperty, void* aStruct) break; } - case eCSSProperty_counter_increment: { + case eCSSProperty__moz_counter_increment: { CSS_ENSURE(Content) { CSS_IF_DELETE(theContent->mCounterIncrement); theContent->mCounterIncrement = (nsCSSCounterData*)aStruct; @@ -2146,7 +2146,7 @@ nsCSSDeclaration::AppendStructValue(nsCSSProperty aProperty, void* aStruct) break; } - case eCSSProperty_counter_reset: { + case eCSSProperty__moz_counter_reset: { CSS_ENSURE(Content) { CSS_IF_DELETE(theContent->mCounterReset); theContent->mCounterReset = (nsCSSCounterData*)aStruct; @@ -2644,17 +2644,17 @@ nsCSSDeclaration::SetValueImportant(nsCSSProperty aProperty) break; } - case eCSSProperty_outline_width: - case eCSSProperty_outline_color: - case eCSSProperty_outline_style: + case eCSSProperty__moz_outline_width: + case eCSSProperty__moz_outline_color: + case eCSSProperty__moz_outline_style: case eCSSProperty_float_edge: { CSS_VARONSTACK_GET(Margin); if (nsnull != theMargin) { CSS_ENSURE_IMPORTANT(Margin) { switch (aProperty) { - CSS_CASE_IMPORTANT(eCSSProperty_outline_width, Margin, mOutlineWidth); - CSS_CASE_IMPORTANT(eCSSProperty_outline_color, Margin, mOutlineColor); - CSS_CASE_IMPORTANT(eCSSProperty_outline_style, Margin, mOutlineStyle); + CSS_CASE_IMPORTANT(eCSSProperty__moz_outline_width, Margin, mOutlineWidth); + CSS_CASE_IMPORTANT(eCSSProperty__moz_outline_color, Margin, mOutlineColor); + CSS_CASE_IMPORTANT(eCSSProperty__moz_outline_style, Margin, mOutlineStyle); CSS_CASE_IMPORTANT(eCSSProperty_float_edge, Margin, mFloatEdge); CSS_BOGUS_DEFAULT; // make compiler happy } @@ -2846,7 +2846,7 @@ nsCSSDeclaration::SetValueImportant(nsCSSProperty aProperty) break; } - case eCSSProperty_counter_increment: { + case eCSSProperty__moz_counter_increment: { CSS_VARONSTACK_GET(Content); if (nsnull != theContent) { if (nsnull != theContent->mCounterIncrement) { @@ -2860,7 +2860,7 @@ nsCSSDeclaration::SetValueImportant(nsCSSProperty aProperty) break; } - case eCSSProperty_counter_reset: { + case eCSSProperty__moz_counter_reset: { CSS_VARONSTACK_GET(Content); if (nsnull != theContent) { if (nsnull != theContent->mCounterReset) { @@ -3134,10 +3134,10 @@ nsCSSDeclaration::SetValueImportant(nsCSSProperty aProperty) SetValueImportant(eCSSProperty_margin_bottom); SetValueImportant(eCSSProperty_margin_left); break; - case eCSSProperty_outline: - SetValueImportant(eCSSProperty_outline_color); - SetValueImportant(eCSSProperty_outline_style); - SetValueImportant(eCSSProperty_outline_width); + case eCSSProperty__moz_outline: + SetValueImportant(eCSSProperty__moz_outline_color); + SetValueImportant(eCSSProperty__moz_outline_style); + SetValueImportant(eCSSProperty__moz_outline_width); break; case eCSSProperty_padding: SetValueImportant(eCSSProperty_padding_top); @@ -3530,15 +3530,15 @@ nsCSSDeclaration::RemoveProperty(nsCSSProperty aProperty) break; } - case eCSSProperty_outline_width: - case eCSSProperty_outline_color: - case eCSSProperty_outline_style: + case eCSSProperty__moz_outline_width: + case eCSSProperty__moz_outline_color: + case eCSSProperty__moz_outline_style: case eCSSProperty_float_edge: { CSS_CHECK(Margin) { switch (aProperty) { - case eCSSProperty_outline_width: theMargin->mOutlineWidth.Reset(); break; - case eCSSProperty_outline_color: theMargin->mOutlineColor.Reset(); break; - case eCSSProperty_outline_style: theMargin->mOutlineStyle.Reset(); break; + case eCSSProperty__moz_outline_width: theMargin->mOutlineWidth.Reset(); break; + case eCSSProperty__moz_outline_color: theMargin->mOutlineColor.Reset(); break; + case eCSSProperty__moz_outline_style: theMargin->mOutlineStyle.Reset(); break; case eCSSProperty_float_edge: theMargin->mFloatEdge.Reset(); break; CSS_BOGUS_DEFAULT; // make compiler happy } @@ -3688,8 +3688,8 @@ nsCSSDeclaration::RemoveProperty(nsCSSProperty aProperty) // nsCSSContent case eCSSProperty_content: - case eCSSProperty_counter_increment: - case eCSSProperty_counter_reset: + case eCSSProperty__moz_counter_increment: + case eCSSProperty__moz_counter_reset: case eCSSProperty_marker_offset: case eCSSProperty_quotes_open: case eCSSProperty_quotes_close: { @@ -3701,13 +3701,13 @@ nsCSSDeclaration::RemoveProperty(nsCSSProperty aProperty) CSS_IF_DELETE(theContent->mContent->mNext); } break; - case eCSSProperty_counter_increment: + case eCSSProperty__moz_counter_increment: CSS_CHECK_DATA(theContent->mCounterIncrement, nsCSSCounterData) { theContent->mCounterIncrement->mCounter.Reset(); CSS_IF_DELETE(theContent->mCounterIncrement->mNext); } break; - case eCSSProperty_counter_reset: + case eCSSProperty__moz_counter_reset: CSS_CHECK_DATA(theContent->mCounterReset, nsCSSCounterData) { theContent->mCounterReset->mCounter.Reset(); CSS_IF_DELETE(theContent->mCounterReset->mNext); @@ -3925,10 +3925,10 @@ nsCSSDeclaration::RemoveProperty(nsCSSProperty aProperty) } break; } - case eCSSProperty_outline: - RemoveProperty(eCSSProperty_outline_color); - RemoveProperty(eCSSProperty_outline_style); - RemoveProperty(eCSSProperty_outline_width); + case eCSSProperty__moz_outline: + RemoveProperty(eCSSProperty__moz_outline_color); + RemoveProperty(eCSSProperty__moz_outline_style); + RemoveProperty(eCSSProperty__moz_outline_width); break; case eCSSProperty_padding: { CSS_CHECK(Margin) { @@ -4366,16 +4366,16 @@ nsCSSDeclaration::GetValue(nsCSSProperty aProperty, nsCSSValue& aValue) break; } - case eCSSProperty_outline_width: - case eCSSProperty_outline_color: - case eCSSProperty_outline_style: + case eCSSProperty__moz_outline_width: + case eCSSProperty__moz_outline_color: + case eCSSProperty__moz_outline_style: case eCSSProperty_float_edge: { CSS_VARONSTACK_GET(Margin); if (nsnull != theMargin) { switch (aProperty) { - case eCSSProperty_outline_width: aValue = theMargin->mOutlineWidth; break; - case eCSSProperty_outline_color: aValue = theMargin->mOutlineColor; break; - case eCSSProperty_outline_style: aValue = theMargin->mOutlineStyle; break; + case eCSSProperty__moz_outline_width: aValue = theMargin->mOutlineWidth; break; + case eCSSProperty__moz_outline_color: aValue = theMargin->mOutlineColor; break; + case eCSSProperty__moz_outline_style: aValue = theMargin->mOutlineStyle; break; case eCSSProperty_float_edge: aValue = theMargin->mFloatEdge; break; CSS_BOGUS_DEFAULT; // make compiler happy } @@ -4557,8 +4557,8 @@ nsCSSDeclaration::GetValue(nsCSSProperty aProperty, nsCSSValue& aValue) // nsCSSContent case eCSSProperty_content: - case eCSSProperty_counter_increment: - case eCSSProperty_counter_reset: + case eCSSProperty__moz_counter_increment: + case eCSSProperty__moz_counter_reset: case eCSSProperty_marker_offset: case eCSSProperty_quotes_open: case eCSSProperty_quotes_close: { @@ -4570,12 +4570,12 @@ nsCSSDeclaration::GetValue(nsCSSProperty aProperty, nsCSSValue& aValue) aValue = theContent->mContent->mValue; } break; - case eCSSProperty_counter_increment: + case eCSSProperty__moz_counter_increment: if (nsnull != theContent->mCounterIncrement) { aValue = theContent->mCounterIncrement->mCounter; } break; - case eCSSProperty_counter_reset: + case eCSSProperty__moz_counter_reset: if (nsnull != theContent->mCounterReset) { aValue = theContent->mCounterReset->mCounter; } @@ -4766,7 +4766,7 @@ nsCSSDeclaration::GetValue(nsCSSProperty aProperty, nsCSSValue& aValue) case eCSSProperty_image_region: case eCSSProperty_list_style: case eCSSProperty_margin: - case eCSSProperty_outline: + case eCSSProperty__moz_outline: case eCSSProperty_padding: case eCSSProperty_pause: case eCSSProperty_quotes: @@ -5131,10 +5131,10 @@ nsCSSDeclaration::GetValue(nsCSSProperty aProperty, } break; } - case eCSSProperty_outline: - if (AppendValueToString(eCSSProperty_outline_color, aValue)) aValue.Append(PRUnichar(' ')); - if (AppendValueToString(eCSSProperty_outline_style, aValue)) aValue.Append(PRUnichar(' ')); - AppendValueToString(eCSSProperty_outline_width, aValue); + case eCSSProperty__moz_outline: + if (AppendValueToString(eCSSProperty__moz_outline_color, aValue)) aValue.Append(PRUnichar(' ')); + if (AppendValueToString(eCSSProperty__moz_outline_style, aValue)) aValue.Append(PRUnichar(' ')); + AppendValueToString(eCSSProperty__moz_outline_width, aValue); break; case eCSSProperty_padding: { CSS_VARONSTACK_GET(Margin); @@ -5279,15 +5279,15 @@ nsCSSDeclaration::GetValue(nsCSSProperty aProperty, } break; } - case eCSSProperty_counter_increment: { + case eCSSProperty__moz_counter_increment: { CSS_VARONSTACK_GET(Content); if ((nsnull != theContent) && (nsnull != theContent->mCounterIncrement)) { nsCSSCounterData* data = theContent->mCounterIncrement; do { - if (AppendValueToString(eCSSProperty_counter_increment, data->mCounter, aValue)) { + if (AppendValueToString(eCSSProperty__moz_counter_increment, data->mCounter, aValue)) { if (HAS_VALUE(data, mValue)) { aValue.Append(PRUnichar(' ')); - AppendValueToString(eCSSProperty_counter_increment, data->mValue, aValue); + AppendValueToString(eCSSProperty__moz_counter_increment, data->mValue, aValue); } } data = data->mNext; @@ -5298,15 +5298,15 @@ nsCSSDeclaration::GetValue(nsCSSProperty aProperty, } break; } - case eCSSProperty_counter_reset: { + case eCSSProperty__moz_counter_reset: { CSS_VARONSTACK_GET(Content); if ((nsnull != theContent) && (nsnull != theContent->mCounterReset)) { nsCSSCounterData* data = theContent->mCounterReset; do { - if (AppendValueToString(eCSSProperty_counter_reset, data->mCounter, aValue)) { + if (AppendValueToString(eCSSProperty__moz_counter_reset, data->mCounter, aValue)) { if (HAS_VALUE(data, mValue)) { aValue.Append(PRUnichar(' ')); - AppendValueToString(eCSSProperty_counter_reset, data->mValue, aValue); + AppendValueToString(eCSSProperty__moz_counter_reset, data->mValue, aValue); } } data = data->mNext; diff --git a/mozilla/content/html/style/src/nsCSSParser.cpp b/mozilla/content/html/style/src/nsCSSParser.cpp index 83e3e8bdaf7..79c97fb3860 100644 --- a/mozilla/content/html/style/src/nsCSSParser.cpp +++ b/mozilla/content/html/style/src/nsCSSParser.cpp @@ -3581,8 +3581,8 @@ PRBool CSSParserImpl::ParseProperty(PRInt32& aErrorCode, return ParseClip(aErrorCode, aDeclaration, aChangeHint); case eCSSProperty_content: return ParseContent(aErrorCode, aDeclaration, aChangeHint); - case eCSSProperty_counter_increment: - case eCSSProperty_counter_reset: + case eCSSProperty__moz_counter_increment: + case eCSSProperty__moz_counter_reset: return ParseCounterData(aErrorCode, aDeclaration, aPropID, aChangeHint); case eCSSProperty_cue: return ParseCue(aErrorCode, aDeclaration, aChangeHint); @@ -3597,7 +3597,7 @@ PRBool CSSParserImpl::ParseProperty(PRInt32& aErrorCode, case eCSSProperty_margin: return ParseMargin(aErrorCode, aDeclaration, aChangeHint); #ifdef ENABLE_OUTLINE - case eCSSProperty_outline: + case eCSSProperty__moz_outline: return ParseOutline(aErrorCode, aDeclaration, aChangeHint); #endif case eCSSProperty_padding: @@ -3700,8 +3700,8 @@ PRBool CSSParserImpl::ParseSingleValueProperty(PRInt32& aErrorCode, case eCSSProperty_border_width: case eCSSProperty_clip: case eCSSProperty_content: - case eCSSProperty_counter_increment: - case eCSSProperty_counter_reset: + case eCSSProperty__moz_counter_increment: + case eCSSProperty__moz_counter_reset: case eCSSProperty_cue: case eCSSProperty_cursor: case eCSSProperty_font: @@ -3709,7 +3709,7 @@ PRBool CSSParserImpl::ParseSingleValueProperty(PRInt32& aErrorCode, case eCSSProperty_list_style: case eCSSProperty_margin: #ifdef ENABLE_OUTLINE - case eCSSProperty_outline: + case eCSSProperty__moz_outline: #endif case eCSSProperty_padding: case eCSSProperty_pause: @@ -3958,13 +3958,13 @@ PRBool CSSParserImpl::ParseSingleValueProperty(PRInt32& aErrorCode, case eCSSProperty_widows: return ParseVariant(aErrorCode, aValue, VARIANT_HI, nsnull); #ifdef ENABLE_OUTLINE - case eCSSProperty_outline_color: + case eCSSProperty__moz_outline_color: return ParseVariant(aErrorCode, aValue, VARIANT_HCK, nsCSSProps::kOutlineColorKTable); - case eCSSProperty_outline_style: + case eCSSProperty__moz_outline_style: return ParseVariant(aErrorCode, aValue, VARIANT_HOK, nsCSSProps::kBorderStyleKTable); - case eCSSProperty_outline_width: + case eCSSProperty__moz_outline_width: return ParseVariant(aErrorCode, aValue, VARIANT_HKL, nsCSSProps::kBorderWidthKTable); #endif @@ -5130,9 +5130,9 @@ PRBool CSSParserImpl::ParseOutline(PRInt32& aErrorCode, nsCSSDeclaration* aDecla { const PRInt32 numProps = 3; static const nsCSSProperty kOutlineIDs[] = { - eCSSProperty_outline_color, - eCSSProperty_outline_style, - eCSSProperty_outline_width + eCSSProperty__moz_outline_color, + eCSSProperty__moz_outline_style, + eCSSProperty__moz_outline_width }; nsCSSValue values[numProps]; diff --git a/mozilla/content/html/style/src/nsCSSStruct.cpp b/mozilla/content/html/style/src/nsCSSStruct.cpp index d38ee70f5a4..02269ec745a 100644 --- a/mozilla/content/html/style/src/nsCSSStruct.cpp +++ b/mozilla/content/html/style/src/nsCSSStruct.cpp @@ -550,9 +550,9 @@ void nsCSSMargin::List(FILE* out, PRInt32 aIndent) const for (PRInt32 index = aIndent; --index >= 0; ) fputs(" ", out); nsAutoString buffer; - mOutlineWidth.AppendToString(buffer, eCSSProperty_outline_width); - mOutlineColor.AppendToString(buffer, eCSSProperty_outline_color); - mOutlineStyle.AppendToString(buffer, eCSSProperty_outline_style); + mOutlineWidth.AppendToString(buffer, eCSSProperty__moz_outline_width); + mOutlineColor.AppendToString(buffer, eCSSProperty__moz_outline_color); + mOutlineStyle.AppendToString(buffer, eCSSProperty__moz_outline_style); if (nsnull != mOutlineRadius) { static const nsCSSProperty trbl[] = { eCSSProperty__moz_outline_radius_topLeft, @@ -912,13 +912,13 @@ void nsCSSContent::List(FILE* out, PRInt32 aIndent) const } nsCSSCounterData* counter = mCounterIncrement; while (nsnull != counter) { - counter->mCounter.AppendToString(buffer, eCSSProperty_counter_increment); + counter->mCounter.AppendToString(buffer, eCSSProperty__moz_counter_increment); counter->mValue.AppendToString(buffer, eCSSProperty_UNKNOWN); counter = counter->mNext; } counter = mCounterReset; while (nsnull != counter) { - counter->mCounter.AppendToString(buffer, eCSSProperty_counter_reset); + counter->mCounter.AppendToString(buffer, eCSSProperty__moz_counter_reset); counter->mValue.AppendToString(buffer, eCSSProperty_UNKNOWN); counter = counter->mNext; } @@ -1711,15 +1711,15 @@ nsCSSDeclaration::AppendValue(nsCSSProperty aProperty, const nsCSSValue& aValue) break; } - case eCSSProperty_outline_width: - case eCSSProperty_outline_color: - case eCSSProperty_outline_style: + case eCSSProperty__moz_outline_width: + case eCSSProperty__moz_outline_color: + case eCSSProperty__moz_outline_style: case eCSSProperty_float_edge: { CSS_ENSURE(Margin) { switch (aProperty) { - case eCSSProperty_outline_width: theMargin->mOutlineWidth = aValue; break; - case eCSSProperty_outline_color: theMargin->mOutlineColor = aValue; break; - case eCSSProperty_outline_style: theMargin->mOutlineStyle = aValue; break; + case eCSSProperty__moz_outline_width: theMargin->mOutlineWidth = aValue; break; + case eCSSProperty__moz_outline_color: theMargin->mOutlineColor = aValue; break; + case eCSSProperty__moz_outline_style: theMargin->mOutlineStyle = aValue; break; case eCSSProperty_float_edge: theMargin->mFloatEdge = aValue; break; CSS_BOGUS_DEFAULT; // make compiler happy } @@ -1870,8 +1870,8 @@ nsCSSDeclaration::AppendValue(nsCSSProperty aProperty, const nsCSSValue& aValue) // nsCSSContent case eCSSProperty_content: - case eCSSProperty_counter_increment: - case eCSSProperty_counter_reset: + case eCSSProperty__moz_counter_increment: + case eCSSProperty__moz_counter_reset: case eCSSProperty_marker_offset: case eCSSProperty_quotes_open: case eCSSProperty_quotes_close: { @@ -1883,13 +1883,13 @@ nsCSSDeclaration::AppendValue(nsCSSProperty aProperty, const nsCSSValue& aValue) CSS_IF_DELETE(theContent->mContent->mNext); } break; - case eCSSProperty_counter_increment: + case eCSSProperty__moz_counter_increment: CSS_ENSURE_DATA(theContent->mCounterIncrement, nsCSSCounterData) { theContent->mCounterIncrement->mCounter = aValue; CSS_IF_DELETE(theContent->mCounterIncrement->mNext); } break; - case eCSSProperty_counter_reset: + case eCSSProperty__moz_counter_reset: CSS_ENSURE_DATA(theContent->mCounterReset, nsCSSCounterData) { theContent->mCounterReset->mCounter = aValue; CSS_IF_DELETE(theContent->mCounterReset->mNext); @@ -2066,7 +2066,7 @@ nsCSSDeclaration::AppendValue(nsCSSProperty aProperty, const nsCSSValue& aValue) case eCSSProperty_image_region: case eCSSProperty_list_style: case eCSSProperty_margin: - case eCSSProperty_outline: + case eCSSProperty__moz_outline: case eCSSProperty_padding: case eCSSProperty_pause: case eCSSProperty_quotes: @@ -2138,7 +2138,7 @@ nsCSSDeclaration::AppendStructValue(nsCSSProperty aProperty, void* aStruct) break; } - case eCSSProperty_counter_increment: { + case eCSSProperty__moz_counter_increment: { CSS_ENSURE(Content) { CSS_IF_DELETE(theContent->mCounterIncrement); theContent->mCounterIncrement = (nsCSSCounterData*)aStruct; @@ -2146,7 +2146,7 @@ nsCSSDeclaration::AppendStructValue(nsCSSProperty aProperty, void* aStruct) break; } - case eCSSProperty_counter_reset: { + case eCSSProperty__moz_counter_reset: { CSS_ENSURE(Content) { CSS_IF_DELETE(theContent->mCounterReset); theContent->mCounterReset = (nsCSSCounterData*)aStruct; @@ -2644,17 +2644,17 @@ nsCSSDeclaration::SetValueImportant(nsCSSProperty aProperty) break; } - case eCSSProperty_outline_width: - case eCSSProperty_outline_color: - case eCSSProperty_outline_style: + case eCSSProperty__moz_outline_width: + case eCSSProperty__moz_outline_color: + case eCSSProperty__moz_outline_style: case eCSSProperty_float_edge: { CSS_VARONSTACK_GET(Margin); if (nsnull != theMargin) { CSS_ENSURE_IMPORTANT(Margin) { switch (aProperty) { - CSS_CASE_IMPORTANT(eCSSProperty_outline_width, Margin, mOutlineWidth); - CSS_CASE_IMPORTANT(eCSSProperty_outline_color, Margin, mOutlineColor); - CSS_CASE_IMPORTANT(eCSSProperty_outline_style, Margin, mOutlineStyle); + CSS_CASE_IMPORTANT(eCSSProperty__moz_outline_width, Margin, mOutlineWidth); + CSS_CASE_IMPORTANT(eCSSProperty__moz_outline_color, Margin, mOutlineColor); + CSS_CASE_IMPORTANT(eCSSProperty__moz_outline_style, Margin, mOutlineStyle); CSS_CASE_IMPORTANT(eCSSProperty_float_edge, Margin, mFloatEdge); CSS_BOGUS_DEFAULT; // make compiler happy } @@ -2846,7 +2846,7 @@ nsCSSDeclaration::SetValueImportant(nsCSSProperty aProperty) break; } - case eCSSProperty_counter_increment: { + case eCSSProperty__moz_counter_increment: { CSS_VARONSTACK_GET(Content); if (nsnull != theContent) { if (nsnull != theContent->mCounterIncrement) { @@ -2860,7 +2860,7 @@ nsCSSDeclaration::SetValueImportant(nsCSSProperty aProperty) break; } - case eCSSProperty_counter_reset: { + case eCSSProperty__moz_counter_reset: { CSS_VARONSTACK_GET(Content); if (nsnull != theContent) { if (nsnull != theContent->mCounterReset) { @@ -3134,10 +3134,10 @@ nsCSSDeclaration::SetValueImportant(nsCSSProperty aProperty) SetValueImportant(eCSSProperty_margin_bottom); SetValueImportant(eCSSProperty_margin_left); break; - case eCSSProperty_outline: - SetValueImportant(eCSSProperty_outline_color); - SetValueImportant(eCSSProperty_outline_style); - SetValueImportant(eCSSProperty_outline_width); + case eCSSProperty__moz_outline: + SetValueImportant(eCSSProperty__moz_outline_color); + SetValueImportant(eCSSProperty__moz_outline_style); + SetValueImportant(eCSSProperty__moz_outline_width); break; case eCSSProperty_padding: SetValueImportant(eCSSProperty_padding_top); @@ -3530,15 +3530,15 @@ nsCSSDeclaration::RemoveProperty(nsCSSProperty aProperty) break; } - case eCSSProperty_outline_width: - case eCSSProperty_outline_color: - case eCSSProperty_outline_style: + case eCSSProperty__moz_outline_width: + case eCSSProperty__moz_outline_color: + case eCSSProperty__moz_outline_style: case eCSSProperty_float_edge: { CSS_CHECK(Margin) { switch (aProperty) { - case eCSSProperty_outline_width: theMargin->mOutlineWidth.Reset(); break; - case eCSSProperty_outline_color: theMargin->mOutlineColor.Reset(); break; - case eCSSProperty_outline_style: theMargin->mOutlineStyle.Reset(); break; + case eCSSProperty__moz_outline_width: theMargin->mOutlineWidth.Reset(); break; + case eCSSProperty__moz_outline_color: theMargin->mOutlineColor.Reset(); break; + case eCSSProperty__moz_outline_style: theMargin->mOutlineStyle.Reset(); break; case eCSSProperty_float_edge: theMargin->mFloatEdge.Reset(); break; CSS_BOGUS_DEFAULT; // make compiler happy } @@ -3688,8 +3688,8 @@ nsCSSDeclaration::RemoveProperty(nsCSSProperty aProperty) // nsCSSContent case eCSSProperty_content: - case eCSSProperty_counter_increment: - case eCSSProperty_counter_reset: + case eCSSProperty__moz_counter_increment: + case eCSSProperty__moz_counter_reset: case eCSSProperty_marker_offset: case eCSSProperty_quotes_open: case eCSSProperty_quotes_close: { @@ -3701,13 +3701,13 @@ nsCSSDeclaration::RemoveProperty(nsCSSProperty aProperty) CSS_IF_DELETE(theContent->mContent->mNext); } break; - case eCSSProperty_counter_increment: + case eCSSProperty__moz_counter_increment: CSS_CHECK_DATA(theContent->mCounterIncrement, nsCSSCounterData) { theContent->mCounterIncrement->mCounter.Reset(); CSS_IF_DELETE(theContent->mCounterIncrement->mNext); } break; - case eCSSProperty_counter_reset: + case eCSSProperty__moz_counter_reset: CSS_CHECK_DATA(theContent->mCounterReset, nsCSSCounterData) { theContent->mCounterReset->mCounter.Reset(); CSS_IF_DELETE(theContent->mCounterReset->mNext); @@ -3925,10 +3925,10 @@ nsCSSDeclaration::RemoveProperty(nsCSSProperty aProperty) } break; } - case eCSSProperty_outline: - RemoveProperty(eCSSProperty_outline_color); - RemoveProperty(eCSSProperty_outline_style); - RemoveProperty(eCSSProperty_outline_width); + case eCSSProperty__moz_outline: + RemoveProperty(eCSSProperty__moz_outline_color); + RemoveProperty(eCSSProperty__moz_outline_style); + RemoveProperty(eCSSProperty__moz_outline_width); break; case eCSSProperty_padding: { CSS_CHECK(Margin) { @@ -4366,16 +4366,16 @@ nsCSSDeclaration::GetValue(nsCSSProperty aProperty, nsCSSValue& aValue) break; } - case eCSSProperty_outline_width: - case eCSSProperty_outline_color: - case eCSSProperty_outline_style: + case eCSSProperty__moz_outline_width: + case eCSSProperty__moz_outline_color: + case eCSSProperty__moz_outline_style: case eCSSProperty_float_edge: { CSS_VARONSTACK_GET(Margin); if (nsnull != theMargin) { switch (aProperty) { - case eCSSProperty_outline_width: aValue = theMargin->mOutlineWidth; break; - case eCSSProperty_outline_color: aValue = theMargin->mOutlineColor; break; - case eCSSProperty_outline_style: aValue = theMargin->mOutlineStyle; break; + case eCSSProperty__moz_outline_width: aValue = theMargin->mOutlineWidth; break; + case eCSSProperty__moz_outline_color: aValue = theMargin->mOutlineColor; break; + case eCSSProperty__moz_outline_style: aValue = theMargin->mOutlineStyle; break; case eCSSProperty_float_edge: aValue = theMargin->mFloatEdge; break; CSS_BOGUS_DEFAULT; // make compiler happy } @@ -4557,8 +4557,8 @@ nsCSSDeclaration::GetValue(nsCSSProperty aProperty, nsCSSValue& aValue) // nsCSSContent case eCSSProperty_content: - case eCSSProperty_counter_increment: - case eCSSProperty_counter_reset: + case eCSSProperty__moz_counter_increment: + case eCSSProperty__moz_counter_reset: case eCSSProperty_marker_offset: case eCSSProperty_quotes_open: case eCSSProperty_quotes_close: { @@ -4570,12 +4570,12 @@ nsCSSDeclaration::GetValue(nsCSSProperty aProperty, nsCSSValue& aValue) aValue = theContent->mContent->mValue; } break; - case eCSSProperty_counter_increment: + case eCSSProperty__moz_counter_increment: if (nsnull != theContent->mCounterIncrement) { aValue = theContent->mCounterIncrement->mCounter; } break; - case eCSSProperty_counter_reset: + case eCSSProperty__moz_counter_reset: if (nsnull != theContent->mCounterReset) { aValue = theContent->mCounterReset->mCounter; } @@ -4766,7 +4766,7 @@ nsCSSDeclaration::GetValue(nsCSSProperty aProperty, nsCSSValue& aValue) case eCSSProperty_image_region: case eCSSProperty_list_style: case eCSSProperty_margin: - case eCSSProperty_outline: + case eCSSProperty__moz_outline: case eCSSProperty_padding: case eCSSProperty_pause: case eCSSProperty_quotes: @@ -5131,10 +5131,10 @@ nsCSSDeclaration::GetValue(nsCSSProperty aProperty, } break; } - case eCSSProperty_outline: - if (AppendValueToString(eCSSProperty_outline_color, aValue)) aValue.Append(PRUnichar(' ')); - if (AppendValueToString(eCSSProperty_outline_style, aValue)) aValue.Append(PRUnichar(' ')); - AppendValueToString(eCSSProperty_outline_width, aValue); + case eCSSProperty__moz_outline: + if (AppendValueToString(eCSSProperty__moz_outline_color, aValue)) aValue.Append(PRUnichar(' ')); + if (AppendValueToString(eCSSProperty__moz_outline_style, aValue)) aValue.Append(PRUnichar(' ')); + AppendValueToString(eCSSProperty__moz_outline_width, aValue); break; case eCSSProperty_padding: { CSS_VARONSTACK_GET(Margin); @@ -5279,15 +5279,15 @@ nsCSSDeclaration::GetValue(nsCSSProperty aProperty, } break; } - case eCSSProperty_counter_increment: { + case eCSSProperty__moz_counter_increment: { CSS_VARONSTACK_GET(Content); if ((nsnull != theContent) && (nsnull != theContent->mCounterIncrement)) { nsCSSCounterData* data = theContent->mCounterIncrement; do { - if (AppendValueToString(eCSSProperty_counter_increment, data->mCounter, aValue)) { + if (AppendValueToString(eCSSProperty__moz_counter_increment, data->mCounter, aValue)) { if (HAS_VALUE(data, mValue)) { aValue.Append(PRUnichar(' ')); - AppendValueToString(eCSSProperty_counter_increment, data->mValue, aValue); + AppendValueToString(eCSSProperty__moz_counter_increment, data->mValue, aValue); } } data = data->mNext; @@ -5298,15 +5298,15 @@ nsCSSDeclaration::GetValue(nsCSSProperty aProperty, } break; } - case eCSSProperty_counter_reset: { + case eCSSProperty__moz_counter_reset: { CSS_VARONSTACK_GET(Content); if ((nsnull != theContent) && (nsnull != theContent->mCounterReset)) { nsCSSCounterData* data = theContent->mCounterReset; do { - if (AppendValueToString(eCSSProperty_counter_reset, data->mCounter, aValue)) { + if (AppendValueToString(eCSSProperty__moz_counter_reset, data->mCounter, aValue)) { if (HAS_VALUE(data, mValue)) { aValue.Append(PRUnichar(' ')); - AppendValueToString(eCSSProperty_counter_reset, data->mValue, aValue); + AppendValueToString(eCSSProperty__moz_counter_reset, data->mValue, aValue); } } data = data->mNext; diff --git a/mozilla/content/html/style/src/nsComputedDOMStyle.cpp b/mozilla/content/html/style/src/nsComputedDOMStyle.cpp index 145b9c45c5a..5031600f6bf 100644 --- a/mozilla/content/html/style/src/nsComputedDOMStyle.cpp +++ b/mozilla/content/html/style/src/nsComputedDOMStyle.cpp @@ -253,10 +253,10 @@ static const nsCSSProperty queryableProperties[] = { eCSSProperty_float_edge, eCSSProperty_opacity, - //// eCSSProperty_outline, - eCSSProperty_outline_color, - eCSSProperty_outline_style, - eCSSProperty_outline_width, + //// eCSSProperty__moz_outline, + eCSSProperty__moz_outline_color, + eCSSProperty__moz_outline_style, + eCSSProperty__moz_outline_width, eCSSProperty_user_focus, eCSSProperty_user_input, @@ -319,6 +319,8 @@ nsComputedDOMStyle::Shutdown() NS_INTERFACE_MAP_BEGIN(nsComputedDOMStyle) NS_INTERFACE_MAP_ENTRY(nsIComputedDOMStyle) NS_INTERFACE_MAP_ENTRY(nsIDOMCSSStyleDeclaration) + NS_INTERFACE_MAP_ENTRY(nsIDOMCSS2Properties) + NS_INTERFACE_MAP_ENTRY(nsIDOMNSCSS2Properties) NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIComputedDOMStyle) NS_INTERFACE_MAP_ENTRY_CONTENT_CLASSINFO(ComputedCSSStyleDeclaration) NS_INTERFACE_MAP_END @@ -611,11 +613,11 @@ nsComputedDOMStyle::GetPropertyCSSValue(const nsAString& aPropertyName, rv = GetMarkerOffset(frame, aReturn); break; // Outline properties - case eCSSProperty_outline_width : + case eCSSProperty__moz_outline_width : rv = GetOutlineWidth(frame, aReturn); break; - case eCSSProperty_outline_style : + case eCSSProperty__moz_outline_style : rv = GetOutlineStyle(frame, aReturn); break; - case eCSSProperty_outline_color: + case eCSSProperty__moz_outline_color: rv = GetOutlineColor(frame, aReturn); break; // Text properties @@ -742,52 +744,6 @@ nsComputedDOMStyle::Item(PRUint32 aIndex, nsAString& aReturn) // Property getters... -#if 0 - -NS_IMETHODIMP -nsComputedDOMStyle::GetAzimuth(nsAString& aAzimuth) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetBackground(nsAString& aBackground) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetBackgroundAttachment(nsAString& aBackgroundAttachment) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetBackgroundColor(nsAString& aBackgroundColor) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetBackgroundImage(nsAString& aBackgroundImage) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetBackgroundPosition(nsAString& aBackgroundPosition) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetBackgroundRepeat(nsAString& aBackgroundRepeat) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -#endif - nsresult nsComputedDOMStyle::GetBinding(nsIFrame *aFrame, nsIDOMCSSValue** aValue) @@ -852,141 +808,6 @@ nsComputedDOMStyle::GetCssFloat(nsIFrame *aFrame, return CallQueryInterface(val, aValue); } -#if 0 - -NS_IMETHODIMP -nsComputedDOMStyle::GetBorder(nsAString& aBorder) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetBorderCollapse(nsAString& aBorderCollapse) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetBorderColor(nsAString& aBorderColor) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetBorderSpacing(nsAString& aBorderSpacing) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetBorderStyle(nsAString& aBorderStyle) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetBorderTop(nsAString& aBorderTop) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetBorderRight(nsAString& aBorderRight) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetBorderBottom(nsAString& aBorderBottom) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetBorderLeft(nsAString& aBorderLeft) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetBorderTopColor(nsAString& aBorderTopColor) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetBorderRightColor(nsAString& aBorderRightColor) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetBorderBottomColor(nsAString& aBorderBottomColor) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetBorderLeftColor(nsAString& aBorderLeftColor) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetBorderTopStyle(nsAString& aBorderTopStyle) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetBorderRightStyle(nsAString& aBorderRightStyle) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetBorderBottomStyle(nsAString& aBorderBottomStyle) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetBorderLeftStyle(nsAString& aBorderLeftStyle) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetBorderTopWidth(nsAString& aBorderTopWidth) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetBorderRightWidth(nsAString& aBorderRightWidth) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetBorderBottomWidth(nsAString& aBorderBottomWidth) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetBorderLeftWidth(nsAString& aBorderLeftWidth) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetBorderWidth(nsAString& aBorderWidth) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} -#endif - nsresult nsComputedDOMStyle::GetBottom(nsIFrame *aFrame, nsIDOMCSSValue** aValue) @@ -1712,7 +1533,7 @@ nsComputedDOMStyle::GetOutlineWidth(nsIFrame *aFrame, case eStyleUnit_Chars: { const nsAFlatCString& width = - nsCSSProps::LookupPropertyValue(eCSSProperty_outline_width, + nsCSSProps::LookupPropertyValue(eCSSProperty__moz_outline_width, outline->mOutlineWidth.GetIntValue()); val->SetIdent(width); break; @@ -2618,86 +2439,6 @@ nsComputedDOMStyle::GetUserSelect(nsIFrame *aFrame, return CallQueryInterface(val, aValue); } -#if 0 -NS_IMETHODIMP -nsComputedDOMStyle::GetCaptionSide(nsAString& aCaptionSide) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetClear(nsAString& aClear) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetClip(nsAString& aClip) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetColor(nsAString& aColor) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetContent(nsAString& aContent) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetCounterIncrement(nsAString& aCounterIncrement) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetCounterReset(nsAString& aCounterReset) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetCssFloat(nsAString& aFloat) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetCue(nsAString& aCue) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetCueAfter(nsAString& aCueAfter) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetCueBefore(nsAString& aCueBefore) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetCursor(nsAString& aCursor) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetDirection(nsAString& aDirection) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} -#endif - nsresult nsComputedDOMStyle::GetDisplay(nsIFrame *aFrame, nsIDOMCSSValue** aValue) @@ -2861,69 +2602,6 @@ nsComputedDOMStyle::GetOverflow(nsIFrame *aFrame, return CallQueryInterface(val, aValue); } -#if 0 -NS_IMETHODIMP -nsComputedDOMStyle::GetElevation(nsAString& aElevation) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetEmptyCells(nsAString& aEmptyCells) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetFont(nsAString& aFont) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetFontFamily(nsAString& aFontFamily) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetFontSize(nsAString& aFontSize) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetFontSizeAdjust(nsAString& aFontSizeAdjust) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetFontStretch(nsAString& aFontStretch) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetFontStyle(nsAString& aFontStyle) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetFontVariant(nsAString& aFontVariant) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetFontWeight(nsAString& aFontWeight) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -#endif - nsresult nsComputedDOMStyle::GetHeight(nsIFrame *aFrame, nsIDOMCSSValue** aValue) @@ -3340,390 +3018,18 @@ nsComputedDOMStyle::GetLeft(nsIFrame *aFrame, nsIDOMCSSValue** aValue) return GetOffsetWidthFor(NS_SIDE_LEFT, aFrame, aValue); } -#if 0 -NS_IMETHODIMP -nsComputedDOMStyle::GetLetterSpacing(nsAString& aLetterSpacing) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetLineHeight(nsAString& aLineHeight) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetListStyle(nsAString& aListStyle) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetListStyleImage(nsAString& aListStyleImage) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetListStylePosition(nsAString& aListStylePosition) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetListStyleType(nsAString& aListStyleType) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetMargin(nsAString& aMargin) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetMarginTop(nsIFrame *aFrame, nsIDOMCSSValue** aValue) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetMarginRight(nsIFrame *aFrame, nsIDOMCSSValue** aValue) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetMarginBottom(nsIFrame *aFrame, nsIDOMCSSValue** aValue) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetMarginLeft(nsIFrame *aFrame, nsIDOMCSSValue** aValue) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetMarkerOffset(nsAString& aMarkerOffset) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetMarks(nsAString& aMarks) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetMaxHeight(nsAString& aMaxHeight) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetMaxWidth(nsAString& aMaxWidth) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetMinHeight(nsAString& aMinHeight) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetMinWidth(nsAString& aMinWidth) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetOrphans(nsAString& aOrphans) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetOutline(nsAString& aOutline) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetOutlineColor(nsAString& aOutlineColor) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetOutlineStyle(nsAString& aOutlineStyle) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetOutlineWidth(nsAString& aOutlineWidth) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetOverflow(nsAString& aOverflow) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetPadding(nsAString& aPadding) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetPaddingTop(nsAString& aPaddingTop) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetPaddingRight(nsAString& aPaddingRight) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetPaddingBottom(nsAString& aPaddingBottom) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetPaddingLeft(nsAString& aPaddingLeft) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetPage(nsAString& aPage) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetPageBreakAfter(nsAString& aPageBreakAfter) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetPageBreakBefore(nsAString& aPageBreakBefore) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetPageBreakInside(nsAString& aPageBreakInside) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetPause(nsAString& aPause) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetPauseAfter(nsAString& aPauseAfter) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetPauseBefore(nsAString& aPauseBefore) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetPitch(nsAString& aPitch) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetPitchRange(nsAString& aPitchRange) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetPlayDuring(nsAString& aPlayDuring) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetPosition(nsAString& aPosition) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetQuotes(nsAString& aQuotes) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetRichness(nsAString& aRichness) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} -#endif - nsresult nsComputedDOMStyle::GetRight(nsIFrame *aFrame, nsIDOMCSSValue** aValue) { return GetOffsetWidthFor(NS_SIDE_RIGHT, aFrame, aValue); } -#if 0 -NS_IMETHODIMP -nsComputedDOMStyle::GetSize(nsAString& aSize) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetSpeak(nsAString& aSpeak) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetSpeakHeader(nsAString& aSpeakHeader) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetSpeakNumeral(nsAString& aSpeakNumeral) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetSpeakPunctuation(nsAString& aSpeakPunctuation) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetSpeechRate(nsAString& aSpeechRate) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetStress(nsAString& aStress) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetTableLayout(nsAString& aTableLayout) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetTextAlign(nsAString& aTextAlign) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetTextDecoration(nsAString& aTextDecoration) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetTextIndent(nsAString& aTextIndent) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetTextShadow(nsAString& aTextShadow) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetTextTransform(nsAString& aTextTransform) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} -#endif - nsresult nsComputedDOMStyle::GetTop(nsIFrame *aFrame, nsIDOMCSSValue** aValue) { return GetOffsetWidthFor(NS_SIDE_TOP, aFrame, aValue); } -#if 0 -NS_IMETHODIMP -nsComputedDOMStyle::GetUnicodeBidi(nsAString& aUnicodeBidi) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetVerticalAlign(nsAString& aVerticalAlign) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetVisibility(nsAString& aVisibility) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetVoiceFamily(nsAString& aVoiceFamily) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetVolume(nsAString& aVolume) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetWhiteSpace(nsAString& aWhiteSpace) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetWidows(nsAString& aWidows) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} -#endif - nsROCSSPrimitiveValue* nsComputedDOMStyle::GetROCSSPrimitiveValue() { @@ -4487,24 +3793,26 @@ nsComputedDOMStyle::GetBorderStyleFor(PRUint8 aSide, nsIFrame *aFrame, return CallQueryInterface(val, aValue); } -#if 0 +// nsIDOMCSS2Properties -NS_IMETHODIMP -nsComputedDOMStyle::GetWordSpacing(nsAString& aWordSpacing) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} +#define CSS_PROP(name_, id_, method_, hint_) \ + NS_IMETHODIMP \ + nsComputedDOMStyle::Get##method_(nsAString& aValue) \ + { \ + return GetPropertyValue(NS_LITERAL_STRING(#name_), aValue); \ + } \ + \ + NS_IMETHODIMP \ + nsComputedDOMStyle::Set##method_(const nsAString& aValue) \ + { \ + return NS_ERROR_DOM_NO_MODIFICATION_ALLOWED_ERR; \ + } -NS_IMETHODIMP -nsComputedDOMStyle::GetZIndex(nsAString& aZIndex) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} +#define CSS_PROP_INTERNAL(name_, id_, method_, hint_) /* nothing */ +#define CSS_PROP_NOTIMPLEMENTED(name_, id_, method_, hint_) \ + CSS_PROP(name_, id_, method_, hint_) -NS_IMETHODIMP -nsComputedDOMStyle::GetOpacity(nsAString& aOpacity) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} +#include "nsCSSPropList.h" -#endif +#undef CSS_PROP_INTERNAL +#undef CSS_PROP diff --git a/mozilla/content/html/style/src/nsComputedDOMStyle.h b/mozilla/content/html/style/src/nsComputedDOMStyle.h index 0df28d0df06..2e607f2c0d3 100644 --- a/mozilla/content/html/style/src/nsComputedDOMStyle.h +++ b/mozilla/content/html/style/src/nsComputedDOMStyle.h @@ -41,6 +41,7 @@ #define nsComputedDOMStyle_h__ #include "nsIComputedDOMStyle.h" +#include "nsIDOMCSS2Properties.h" #include "nsROCSSPrimitiveValue.h" #include "nsDOMCSSRGBColor.h" @@ -52,7 +53,8 @@ #include "nsCOMPtr.h" #include "nsWeakReference.h" -class nsComputedDOMStyle : public nsIComputedDOMStyle +class nsComputedDOMStyle : public nsIComputedDOMStyle, + public nsIDOMNSCSS2Properties { public: NS_DECL_ISUPPORTS @@ -61,6 +63,9 @@ public: const nsAString& aPseudoElt, nsIPresShell *aPresShell); + NS_DECL_NSIDOMCSS2PROPERTIES + NS_DECL_NSIDOMNSCSS2PROPERTIES + NS_DECL_NSIDOMCSSSTYLEDECLARATION nsComputedDOMStyle(); diff --git a/mozilla/content/html/style/src/nsDOMCSSDeclaration.cpp b/mozilla/content/html/style/src/nsDOMCSSDeclaration.cpp index 83d93ddccc9..8efa0d5a4ed 100644 --- a/mozilla/content/html/style/src/nsDOMCSSDeclaration.cpp +++ b/mozilla/content/html/style/src/nsDOMCSSDeclaration.cpp @@ -232,172 +232,27 @@ CallSetProperty(nsDOMCSSDeclaration* aDecl, return aDecl->ParsePropertyValue(aPropName, aValue); } -#define IMPL_CSSPROP(attname_, propname_) \ + +// nsIDOMCSS2Properties + +#define CSS_PROP(name_, id_, method_, hint_) \ NS_IMETHODIMP \ - nsDOMCSSDeclaration::Get##attname_(nsAString& aValue) \ + nsDOMCSSDeclaration::Get##method_(nsAString& aValue) \ { \ - return GetPropertyValue(propname_, aValue); \ + return GetPropertyValue(NS_LITERAL_STRING(#name_), aValue); \ } \ \ NS_IMETHODIMP \ - nsDOMCSSDeclaration::Set##attname_(const nsAString& aValue) \ + nsDOMCSSDeclaration::Set##method_(const nsAString& aValue) \ { \ - return CallSetProperty(this, propname_, aValue); \ + return CallSetProperty(this, NS_LITERAL_STRING(#name_), aValue); \ } - // nsIDOMCSS2Properties -IMPL_CSSPROP(Azimuth, NS_LITERAL_STRING("azimuth")) -IMPL_CSSPROP(Background, NS_LITERAL_STRING("background")) -IMPL_CSSPROP(BackgroundAttachment, NS_LITERAL_STRING("background-attachment")) -IMPL_CSSPROP(BackgroundColor, NS_LITERAL_STRING("background-color")) -IMPL_CSSPROP(BackgroundImage, NS_LITERAL_STRING("background-image")) -IMPL_CSSPROP(BackgroundPosition, NS_LITERAL_STRING("background-position")) -IMPL_CSSPROP(BackgroundRepeat, NS_LITERAL_STRING("background-repeat")) -IMPL_CSSPROP(Border, NS_LITERAL_STRING("border")) -IMPL_CSSPROP(BorderCollapse, NS_LITERAL_STRING("border-collapse")) -IMPL_CSSPROP(BorderColor, NS_LITERAL_STRING("border-color")) -IMPL_CSSPROP(BorderSpacing, NS_LITERAL_STRING("border-spacing")) -IMPL_CSSPROP(BorderStyle, NS_LITERAL_STRING("border-style")) -IMPL_CSSPROP(BorderTop, NS_LITERAL_STRING("border-top")) -IMPL_CSSPROP(BorderRight, NS_LITERAL_STRING("border-right")) -IMPL_CSSPROP(BorderBottom, NS_LITERAL_STRING("border-bottom")) -IMPL_CSSPROP(BorderLeft, NS_LITERAL_STRING("border-left")) -IMPL_CSSPROP(BorderTopColor, NS_LITERAL_STRING("border-top-color")) -IMPL_CSSPROP(BorderRightColor, NS_LITERAL_STRING("border-right-color")) -IMPL_CSSPROP(BorderBottomColor, NS_LITERAL_STRING("border-bottom-color")) -IMPL_CSSPROP(BorderLeftColor, NS_LITERAL_STRING("border-left-color")) -IMPL_CSSPROP(BorderTopStyle, NS_LITERAL_STRING("border-top-style")) -IMPL_CSSPROP(BorderRightStyle, NS_LITERAL_STRING("border-right-style")) -IMPL_CSSPROP(BorderBottomStyle, NS_LITERAL_STRING("border-bottom-style")) -IMPL_CSSPROP(BorderLeftStyle, NS_LITERAL_STRING("border-left-style")) -IMPL_CSSPROP(BorderTopWidth, NS_LITERAL_STRING("border-top-width")) -IMPL_CSSPROP(BorderRightWidth, NS_LITERAL_STRING("border-right-width")) -IMPL_CSSPROP(BorderBottomWidth, NS_LITERAL_STRING("border-bottom-width")) -IMPL_CSSPROP(BorderLeftWidth, NS_LITERAL_STRING("border-left-width")) -IMPL_CSSPROP(BorderWidth, NS_LITERAL_STRING("border-width")) -IMPL_CSSPROP(Bottom, NS_LITERAL_STRING("bottom")) -IMPL_CSSPROP(CaptionSide, NS_LITERAL_STRING("caption-side")) -IMPL_CSSPROP(Clear, NS_LITERAL_STRING("clear")) -IMPL_CSSPROP(Clip, NS_LITERAL_STRING("clip")) -IMPL_CSSPROP(Color, NS_LITERAL_STRING("color")) -IMPL_CSSPROP(Content, NS_LITERAL_STRING("content")) -IMPL_CSSPROP(CounterIncrement, NS_LITERAL_STRING("counter-increment")) -IMPL_CSSPROP(CounterReset, NS_LITERAL_STRING("counter-reset")) -IMPL_CSSPROP(CssFloat, NS_LITERAL_STRING("float")) -IMPL_CSSPROP(Cue, NS_LITERAL_STRING("cue")) -IMPL_CSSPROP(CueAfter, NS_LITERAL_STRING("cue-after")) -IMPL_CSSPROP(CueBefore, NS_LITERAL_STRING("cue-before")) -IMPL_CSSPROP(Cursor, NS_LITERAL_STRING("cursor")) -IMPL_CSSPROP(Direction, NS_LITERAL_STRING("direction")) -IMPL_CSSPROP(Display, NS_LITERAL_STRING("display")) -IMPL_CSSPROP(Elevation, NS_LITERAL_STRING("elevation")) -IMPL_CSSPROP(EmptyCells, NS_LITERAL_STRING("empty-cells")) -IMPL_CSSPROP(Font, NS_LITERAL_STRING("font")) -IMPL_CSSPROP(FontFamily, NS_LITERAL_STRING("font-family")) -IMPL_CSSPROP(FontSize, NS_LITERAL_STRING("font-size")) -IMPL_CSSPROP(FontSizeAdjust, NS_LITERAL_STRING("font-size-adjust")) -IMPL_CSSPROP(FontStretch, NS_LITERAL_STRING("font-stretch")) -IMPL_CSSPROP(FontStyle, NS_LITERAL_STRING("font-style")) -IMPL_CSSPROP(FontVariant, NS_LITERAL_STRING("font-variant")) -IMPL_CSSPROP(FontWeight, NS_LITERAL_STRING("font-weight")) -IMPL_CSSPROP(Height, NS_LITERAL_STRING("height")) -IMPL_CSSPROP(Left, NS_LITERAL_STRING("left")) -IMPL_CSSPROP(LetterSpacing, NS_LITERAL_STRING("letter-spacing")) -IMPL_CSSPROP(LineHeight, NS_LITERAL_STRING("line-height")) -IMPL_CSSPROP(ListStyle, NS_LITERAL_STRING("list-style")) -IMPL_CSSPROP(ListStyleImage, NS_LITERAL_STRING("list-style-image")) -IMPL_CSSPROP(ListStylePosition, NS_LITERAL_STRING("list-style-position")) -IMPL_CSSPROP(ListStyleType, NS_LITERAL_STRING("list-style-type")) -IMPL_CSSPROP(Margin, NS_LITERAL_STRING("margin")) -IMPL_CSSPROP(MarginTop, NS_LITERAL_STRING("margin-top")) -IMPL_CSSPROP(MarginRight, NS_LITERAL_STRING("margin-right")) -IMPL_CSSPROP(MarginBottom, NS_LITERAL_STRING("margin-bottom")) -IMPL_CSSPROP(MarginLeft, NS_LITERAL_STRING("margin-left")) -IMPL_CSSPROP(MarkerOffset, NS_LITERAL_STRING("marker-offset")) -IMPL_CSSPROP(Marks, NS_LITERAL_STRING("marks")) -IMPL_CSSPROP(MaxHeight, NS_LITERAL_STRING("max-height")) -IMPL_CSSPROP(MaxWidth, NS_LITERAL_STRING("max-width")) -IMPL_CSSPROP(MinHeight, NS_LITERAL_STRING("min-height")) -IMPL_CSSPROP(MinWidth, NS_LITERAL_STRING("min-width")) -IMPL_CSSPROP(Orphans, NS_LITERAL_STRING("orphans")) - // XXX Because of the renaming to -moz-outline, these 4 do nothing: -IMPL_CSSPROP(Outline, NS_LITERAL_STRING("outline")) -IMPL_CSSPROP(OutlineColor, NS_LITERAL_STRING("outline-color")) -IMPL_CSSPROP(OutlineStyle, NS_LITERAL_STRING("outline-style")) -IMPL_CSSPROP(OutlineWidth, NS_LITERAL_STRING("outline-width")) -IMPL_CSSPROP(Overflow, NS_LITERAL_STRING("overflow")) -IMPL_CSSPROP(Padding, NS_LITERAL_STRING("padding")) -IMPL_CSSPROP(PaddingTop, NS_LITERAL_STRING("padding-top")) -IMPL_CSSPROP(PaddingRight, NS_LITERAL_STRING("padding-right")) -IMPL_CSSPROP(PaddingBottom, NS_LITERAL_STRING("padding-bottom")) -IMPL_CSSPROP(PaddingLeft, NS_LITERAL_STRING("padding-left")) -IMPL_CSSPROP(Page, NS_LITERAL_STRING("page")) -IMPL_CSSPROP(PageBreakAfter, NS_LITERAL_STRING("page-break-after")) -IMPL_CSSPROP(PageBreakBefore, NS_LITERAL_STRING("page-break-before")) -IMPL_CSSPROP(PageBreakInside, NS_LITERAL_STRING("page-break-inside")) -IMPL_CSSPROP(Pause, NS_LITERAL_STRING("pause")) -IMPL_CSSPROP(PauseAfter, NS_LITERAL_STRING("pause-after")) -IMPL_CSSPROP(PauseBefore, NS_LITERAL_STRING("pause-before")) -IMPL_CSSPROP(Pitch, NS_LITERAL_STRING("pitch")) -IMPL_CSSPROP(PitchRange, NS_LITERAL_STRING("pitch-range")) -IMPL_CSSPROP(PlayDuring, NS_LITERAL_STRING("play-during")) -IMPL_CSSPROP(Position, NS_LITERAL_STRING("position")) -IMPL_CSSPROP(Quotes, NS_LITERAL_STRING("quotes")) -IMPL_CSSPROP(Richness, NS_LITERAL_STRING("richness")) -IMPL_CSSPROP(Right, NS_LITERAL_STRING("right")) -IMPL_CSSPROP(Size, NS_LITERAL_STRING("size")) -IMPL_CSSPROP(Speak, NS_LITERAL_STRING("speak")) -IMPL_CSSPROP(SpeakHeader, NS_LITERAL_STRING("speak-header")) -IMPL_CSSPROP(SpeakNumeral, NS_LITERAL_STRING("speak-numeral")) -IMPL_CSSPROP(SpeakPunctuation, NS_LITERAL_STRING("speak-punctuation")) -IMPL_CSSPROP(SpeechRate, NS_LITERAL_STRING("speech-rate")) -IMPL_CSSPROP(Stress, NS_LITERAL_STRING("stress")) -IMPL_CSSPROP(TableLayout, NS_LITERAL_STRING("table-layout")) -IMPL_CSSPROP(TextAlign, NS_LITERAL_STRING("text-align")) -IMPL_CSSPROP(TextDecoration, NS_LITERAL_STRING("text-decoration")) -IMPL_CSSPROP(TextIndent, NS_LITERAL_STRING("text-indent")) -IMPL_CSSPROP(TextShadow, NS_LITERAL_STRING("text-shadow")) -IMPL_CSSPROP(TextTransform, NS_LITERAL_STRING("text-transform")) -IMPL_CSSPROP(Top, NS_LITERAL_STRING("top")) -IMPL_CSSPROP(UnicodeBidi, NS_LITERAL_STRING("unicode-bidi")) -IMPL_CSSPROP(VerticalAlign, NS_LITERAL_STRING("vertical-align")) -IMPL_CSSPROP(Visibility, NS_LITERAL_STRING("visibility")) -IMPL_CSSPROP(VoiceFamily, NS_LITERAL_STRING("voice-family")) -IMPL_CSSPROP(Volume, NS_LITERAL_STRING("volume")) -IMPL_CSSPROP(WhiteSpace, NS_LITERAL_STRING("white-space")) -IMPL_CSSPROP(Widows, NS_LITERAL_STRING("widows")) -IMPL_CSSPROP(Width, NS_LITERAL_STRING("width")) -IMPL_CSSPROP(WordSpacing, NS_LITERAL_STRING("word-spacing")) -IMPL_CSSPROP(ZIndex, NS_LITERAL_STRING("z-index")) +#define CSS_PROP_INTERNAL(name_, id_, method_, hint_) /* nothing */ +#define CSS_PROP_NOTIMPLEMENTED(name_, id_, method_, hint_) \ + CSS_PROP(name_, id_, method_, hint_) - // nsIDOMNSCSS2Properties -IMPL_CSSPROP(MozBinding, NS_LITERAL_STRING("-moz-binding")) -IMPL_CSSPROP(MozBorderRadius, NS_LITERAL_STRING("-moz-border-radius")) -IMPL_CSSPROP(MozBorderRadiusTopleft, NS_LITERAL_STRING("-moz-border-radius-topleft")) -IMPL_CSSPROP(MozBorderRadiusTopright, NS_LITERAL_STRING("-moz-border-radius-topright")) -IMPL_CSSPROP(MozBorderRadiusBottomleft, NS_LITERAL_STRING("-moz-border-radius-bottomleft")) -IMPL_CSSPROP(MozBorderRadiusBottomright, NS_LITERAL_STRING("-moz-border-radius-bottomright")) -IMPL_CSSPROP(MozBoxAlign, NS_LITERAL_STRING("-moz-box-align")) -IMPL_CSSPROP(MozBoxDirection, NS_LITERAL_STRING("-moz-box-direction")) -IMPL_CSSPROP(MozBoxFlex, NS_LITERAL_STRING("-moz-box-flex")) -IMPL_CSSPROP(MozBoxFlexGroup, NS_LITERAL_STRING("-moz-box-flex-group")) -IMPL_CSSPROP(MozBoxOrient, NS_LITERAL_STRING("-moz-box-orient")) -IMPL_CSSPROP(MozBoxPack, NS_LITERAL_STRING("-moz-box-pack")) -IMPL_CSSPROP(MozBoxSizing, NS_LITERAL_STRING("-moz-box-sizing")) -IMPL_CSSPROP(MozFloatEdge, NS_LITERAL_STRING("-moz-float-edge")) -IMPL_CSSPROP(MozKeyEquivalent, NS_LITERAL_STRING("-moz-key-equivalent")) -IMPL_CSSPROP(MozOpacity, NS_LITERAL_STRING("-moz-opacity")) -IMPL_CSSPROP(MozOutline, NS_LITERAL_STRING("-moz-outline")) -IMPL_CSSPROP(MozOutlineColor, NS_LITERAL_STRING("-moz-outline-color")) -IMPL_CSSPROP(MozOutlineRadius, NS_LITERAL_STRING("-moz-outline-radius")) -IMPL_CSSPROP(MozOutlineRadiusTopleft, NS_LITERAL_STRING("-moz-outline-radius-topleft")) -IMPL_CSSPROP(MozOutlineRadiusTopright, NS_LITERAL_STRING("-moz-outline-radius-topright")) -IMPL_CSSPROP(MozOutlineRadiusBottomleft, NS_LITERAL_STRING("-moz-outline-radius-bottomleft")) -IMPL_CSSPROP(MozOutlineRadiusBottomright, NS_LITERAL_STRING("-moz-outline-radius-bottomright")) -IMPL_CSSPROP(MozOutlineStyle, NS_LITERAL_STRING("-moz-outline-style")) -IMPL_CSSPROP(MozOutlineWidth, NS_LITERAL_STRING("-moz-outline-width")) -IMPL_CSSPROP(MozResizer, NS_LITERAL_STRING("-moz-resizer")) -IMPL_CSSPROP(MozUserFocus, NS_LITERAL_STRING("-moz-user-focus")) -IMPL_CSSPROP(MozUserInput, NS_LITERAL_STRING("-moz-user-input")) -IMPL_CSSPROP(MozUserModify, NS_LITERAL_STRING("-moz-user-modify")) -IMPL_CSSPROP(MozUserSelect, NS_LITERAL_STRING("-moz-user-select")) +#include "nsCSSPropList.h" + +#undef CSS_PROP_INTERNAL +#undef CSS_PROP diff --git a/mozilla/content/shared/public/nsCSSPropList.h b/mozilla/content/shared/public/nsCSSPropList.h index 9f83ac2ab01..5615b637c2d 100644 --- a/mozilla/content/shared/public/nsCSSPropList.h +++ b/mozilla/content/shared/public/nsCSSPropList.h @@ -41,8 +41,8 @@ This file contains the list of all parsed CSS properties See nsCSSProps.h for access to the enum values for properties - It is designed to be used as inline input to nsCSSProps.cpp *only* - through the magic of C preprocessing. + It is designed to be used as inline input through the magic of + C preprocessing. All entries must be enclosed in the macro CSS_PROP which will have cruel and unusual things done to it @@ -52,19 +52,38 @@ Requirements: - Entries are in the form: (name,id,effect). 'id' must always be the same as - 'name' except that all hyphens ('-') in 'name' are converted to underscores - ('_') in 'id'. This lets us do nice things with the macros without having to - copy/convert strings at runtime. - - 'name' entries *must* use only lowercase characters. + Entries are in the form: (name, id, method, hint). + + 'name' entries represent a CSS property name and *must* use only + lowercase characters. + + 'id' must always be the same as 'name' except that all hyphens ('-') + in 'name' are converted to underscores ('_') in 'id'. This lets us + do nice things with the macros without having to copy/convert strings + at runtime. + + 'method' is designed to be as input for CSS2Properties and similar callers. + It must always be the same as 'name' except it must use InterCaps and all + hyphens ('-') must be removed. + + 'hint' says what needs to be recomputed when the property changes. + + ** Break these invariants and bad things will happen. ** - ** Break these invariants and bad things will happen. ** - - The third argument says what needs to be recomputed when the property - changes. ******/ +// Assume the user wants internal properties, but not unimplemented ones +#ifndef CSS_PROP_INTERNAL +#define CSS_PROP_INTERNAL(_name, _id, _method, _hint) \ + CSS_PROP(_name, _id, _method, _hint) +#define DEFINED_CSS_PROP_INTERNAL +#endif + +#ifndef CSS_PROP_NOTIMPLEMENTED +#define CSS_PROP_NOTIMPLEMENTED(_name, _id, _method, _hint) /* nothing */ +#define DEFINED_CSS_PROP_NOTIMPLEMENTED +#endif + // For notes XXX bug 3935 below, the names being parsed do not correspond // to the constants used internally. It would be nice to bring the // constants into line sometime. @@ -76,194 +95,212 @@ // support them correctly the old constants need to be renamed and // new ones should be entered. -CSS_PROP(-moz-appearance, appearance, REFLOW) -CSS_PROP(-moz-border-radius, _moz_border_radius, VISUAL) -CSS_PROP(-moz-border-radius-topleft, _moz_border_radius_topLeft, VISUAL) -CSS_PROP(-moz-border-radius-topright, _moz_border_radius_topRight, VISUAL) -CSS_PROP(-moz-border-radius-bottomleft, _moz_border_radius_bottomLeft, VISUAL) -CSS_PROP(-moz-border-radius-bottomright, _moz_border_radius_bottomRight, VISUAL) -CSS_PROP(-moz-outline-radius, _moz_outline_radius, VISUAL) -CSS_PROP(-moz-outline-radius-topleft, _moz_outline_radius_topLeft, VISUAL) -CSS_PROP(-moz-outline-radius-topright, _moz_outline_radius_topRight, VISUAL) -CSS_PROP(-moz-outline-radius-bottomleft, _moz_outline_radius_bottomLeft, VISUAL) -CSS_PROP(-moz-outline-radius-bottomright, _moz_outline_radius_bottomRight, VISUAL) -CSS_PROP(azimuth, azimuth, AURAL) -CSS_PROP(background, background, VISUAL) -CSS_PROP(background-attachment, background_attachment, FRAMECHANGE) -CSS_PROP(background-color, background_color, VISUAL) -CSS_PROP(background-image, background_image, VISUAL) -CSS_PROP(background-position, background_position, VISUAL) -CSS_PROP(background-repeat, background_repeat, VISUAL) -CSS_PROP(-x-background-x-position, background_x_position, VISUAL) // XXX bug 3935 -CSS_PROP(-x-background-y-position, background_y_position, VISUAL) // XXX bug 3935 -CSS_PROP(-moz-binding, binding, FRAMECHANGE) // XXX bug 3935 -CSS_PROP(border, border, REFLOW) -CSS_PROP(border-bottom, border_bottom, REFLOW) -CSS_PROP(border-bottom-color, border_bottom_color, VISUAL) -CSS_PROP(-moz-border-bottom-colors, border_bottom_colors, VISUAL) -CSS_PROP(border-bottom-style, border_bottom_style, REFLOW) // on/off will need reflow -CSS_PROP(border-bottom-width, border_bottom_width, REFLOW) -CSS_PROP(border-collapse, border_collapse, FRAMECHANGE) -CSS_PROP(border-color, border_color, VISUAL) -CSS_PROP(border-left, border_left, REFLOW) -CSS_PROP(border-left-color, border_left_color, VISUAL) -CSS_PROP(-moz-border-left-colors, border_left_colors, VISUAL) -CSS_PROP(border-left-style, border_left_style, REFLOW) // on/off will need reflow -CSS_PROP(border-left-width, border_left_width, REFLOW) -CSS_PROP(border-right, border_right, REFLOW) -CSS_PROP(border-right-color, border_right_color, VISUAL) -CSS_PROP(-moz-border-right-colors, border_right_colors, VISUAL) -CSS_PROP(border-right-style, border_right_style, REFLOW) // on/off will need reflow -CSS_PROP(border-right-width, border_right_width, REFLOW) -CSS_PROP(border-spacing, border_spacing, REFLOW) -CSS_PROP(border-style, border_style, REFLOW) // on/off will need reflow -CSS_PROP(border-top, border_top, REFLOW) -CSS_PROP(border-top-color, border_top_color, VISUAL) -CSS_PROP(-moz-border-top-colors, border_top_colors, VISUAL) -CSS_PROP(border-top-style, border_top_style, REFLOW) // on/off will need reflow -CSS_PROP(border-top-width, border_top_width, REFLOW) -CSS_PROP(border-width, border_width, REFLOW) -CSS_PROP(-x-border-x-spacing, border_x_spacing, REFLOW) // XXX bug 3935 -CSS_PROP(-x-border-y-spacing, border_y_spacing, REFLOW) // XXX bug 3935 -CSS_PROP(bottom, bottom, REFLOW) -CSS_PROP(-moz-box-align, box_align, REFLOW) // XXX bug 3935 -CSS_PROP(-moz-box-direction, box_direction, REFLOW) // XXX bug 3935 -CSS_PROP(-moz-box-flex, box_flex, REFLOW) // XXX bug 3935 -CSS_PROP(-moz-box-flex-group, box_flex_group, REFLOW) // XXX bug 3935 -CSS_PROP(-moz-box-orient, box_orient, REFLOW) // XXX bug 3935 -CSS_PROP(-moz-box-pack, box_pack, REFLOW) // XXX bug 3935 -CSS_PROP(-moz-box-sizing, box_sizing, REFLOW) // XXX bug 3935 -CSS_PROP(-moz-box-ordinal-group, box_ordinal_group, FRAMECHANGE) -CSS_PROP(caption-side, caption_side, REFLOW) -CSS_PROP(clear, clear, REFLOW) -CSS_PROP(clip, clip, REFLOW) -CSS_PROP(-x-clip-bottom, clip_bottom, REFLOW) // XXX bug 3935 -CSS_PROP(-x-clip-left, clip_left, REFLOW) // XXX bug 3935 -CSS_PROP(-x-clip-right, clip_right, REFLOW) // XXX bug 3935 -CSS_PROP(-x-clip-top, clip_top, REFLOW) // XXX bug 3935 -CSS_PROP(color, color, VISUAL) -CSS_PROP(content, content, FRAMECHANGE) -CSS_PROP(-moz-counter-increment, counter_increment, REFLOW) // XXX bug 137285 -CSS_PROP(-moz-counter-reset, counter_reset, REFLOW) // XXX bug 137285 -CSS_PROP(cue, cue, AURAL) -CSS_PROP(cue-after, cue_after, AURAL) -CSS_PROP(cue-before, cue_before, AURAL) -CSS_PROP(cursor, cursor, VISUAL) -CSS_PROP(direction, direction, REFLOW) -CSS_PROP(display, display, FRAMECHANGE) -CSS_PROP(elevation, elevation, AURAL) -CSS_PROP(empty-cells, empty_cells, VISUAL) -CSS_PROP(float, float, FRAMECHANGE) -CSS_PROP(-moz-float-edge, float_edge, REFLOW) // XXX bug 3935 -CSS_PROP(font, font, REFLOW) -CSS_PROP(font-family, font_family, REFLOW) -CSS_PROP(font-size, font_size, REFLOW) -CSS_PROP(font-size-adjust, font_size_adjust, REFLOW) -CSS_PROP(font-stretch, font_stretch, REFLOW) -CSS_PROP(font-style, font_style, REFLOW) -CSS_PROP(font-variant, font_variant, REFLOW) -CSS_PROP(font-weight, font_weight, REFLOW) -CSS_PROP(-moz-force-broken-image-icon, force_broken_image_icon, FRAMECHANGE) // bug 58646 -CSS_PROP(height, height, REFLOW) -CSS_PROP(-moz-image-region, image_region, REFLOW) -CSS_PROP(-x-image-region-bottom, image_region_bottom, REFLOW) -CSS_PROP(-x-image-region-left, image_region_left, REFLOW) -CSS_PROP(-x-image-region-right, image_region_right, REFLOW) -CSS_PROP(-x-image-region-top, image_region_top, REFLOW) -CSS_PROP(-moz-key-equivalent, key_equivalent, CONTENT) // This will need some other notification, but what? // XXX bug 3935 -CSS_PROP(left, left, REFLOW) -CSS_PROP(letter-spacing, letter_spacing, REFLOW) -CSS_PROP(line-height, line_height, REFLOW) -CSS_PROP(list-style, list_style, REFLOW) -CSS_PROP(list-style-image, list_style_image, REFLOW) -CSS_PROP(list-style-position, list_style_position, REFLOW) -CSS_PROP(list-style-type, list_style_type, REFLOW) -CSS_PROP(margin, margin, REFLOW) -CSS_PROP(margin-bottom, margin_bottom, REFLOW) -CSS_PROP(margin-left, margin_left, REFLOW) -CSS_PROP(margin-right, margin_right, REFLOW) -CSS_PROP(margin-top, margin_top, REFLOW) -CSS_PROP(marker-offset, marker_offset, REFLOW) -CSS_PROP(marks, marks, VISUAL) -CSS_PROP(max-height, max_height, REFLOW) -CSS_PROP(max-width, max_width, REFLOW) -CSS_PROP(min-height, min_height, REFLOW) -CSS_PROP(min-width, min_width, REFLOW) -CSS_PROP(-moz-opacity, opacity, FRAMECHANGE) // XXX bug 3935 -CSS_PROP(orphans, orphans, REFLOW) -CSS_PROP(-moz-outline, outline, VISUAL) // XXX This is temporary fix for nsbeta3+ Bug 48973, turning outline into -moz-outline XXX bug 48973 -CSS_PROP(-moz-outline-color, outline_color, VISUAL) // XXX bug 48973 -CSS_PROP(-moz-outline-style, outline_style, VISUAL) // XXX bug 48973 -CSS_PROP(-moz-outline-width, outline_width, VISUAL) // XXX bug 48973 -CSS_PROP(overflow, overflow, FRAMECHANGE) -CSS_PROP(padding, padding, REFLOW) -CSS_PROP(padding-bottom, padding_bottom, REFLOW) -CSS_PROP(padding-left, padding_left, REFLOW) -CSS_PROP(padding-right, padding_right, REFLOW) -CSS_PROP(padding-top, padding_top, REFLOW) -CSS_PROP(page, page, REFLOW) -CSS_PROP(page-break-after, page_break_after, REFLOW) -CSS_PROP(page-break-before, page_break_before, REFLOW) -CSS_PROP(page-break-inside, page_break_inside, REFLOW) -CSS_PROP(pause, pause, AURAL) -CSS_PROP(pause-after, pause_after, AURAL) -CSS_PROP(pause-before, pause_before, AURAL) -CSS_PROP(pitch, pitch, AURAL) -CSS_PROP(pitch-range, pitch_range, AURAL) -CSS_PROP(play-during, play_during, AURAL) -CSS_PROP(-x-play-during-flags, play_during_flags, AURAL) // XXX why is this here? -CSS_PROP(position, position, FRAMECHANGE) -CSS_PROP(quotes, quotes, REFLOW) -CSS_PROP(-x-quotes-close, quotes_close, REFLOW) // XXX bug 3935 -CSS_PROP(-x-quotes-open, quotes_open, REFLOW) // XXX bug 3935 -CSS_PROP(-moz-resizer, resizer, FRAMECHANGE) // XXX bug 3935 -CSS_PROP(richness, richness, AURAL) -CSS_PROP(right, right, REFLOW) -CSS_PROP(size, size, REFLOW) -CSS_PROP(-x-size-height, size_height, REFLOW) // XXX bug 3935 -CSS_PROP(-x-size-width, size_width, REFLOW) // XXX bug 3935 -CSS_PROP(speak, speak, AURAL) -CSS_PROP(speak-header, speak_header, AURAL) -CSS_PROP(speak-numeral, speak_numeral, AURAL) -CSS_PROP(speak-punctuation, speak_punctuation, AURAL) -CSS_PROP(speech-rate, speech_rate, AURAL) -CSS_PROP(stress, stress, AURAL) -CSS_PROP(table-layout, table_layout, REFLOW) -CSS_PROP(text-align, text_align, REFLOW) -CSS_PROP(text-decoration, text_decoration, VISUAL) -CSS_PROP(text-indent, text_indent, REFLOW) -CSS_PROP(text-shadow, text_shadow, VISUAL) -CSS_PROP(-x-text-shadow-color, text_shadow_color, VISUAL) // XXX bug 3935 -CSS_PROP(-x-text-shadow-radius, text_shadow_radius, VISUAL) // XXX bug 3935 -CSS_PROP(-x-text-shadow-x, text_shadow_x, VISUAL) // XXX bug 3935 -CSS_PROP(-x-text-shadow-y, text_shadow_y, VISUAL) // XXX bug 3935 -CSS_PROP(text-transform, text_transform, REFLOW) -CSS_PROP(top, top, REFLOW) -CSS_PROP(unicode-bidi, unicode_bidi, REFLOW) -CSS_PROP(-moz-user-focus, user_focus, CONTENT) // XXX bug 3935 -CSS_PROP(-moz-user-input, user_input, FRAMECHANGE) // XXX ??? // XXX bug 3935 -CSS_PROP(-moz-user-modify, user_modify, FRAMECHANGE) // XXX bug 3935 -CSS_PROP(-moz-user-select, user_select, CONTENT) // XXX bug 3935 -CSS_PROP(vertical-align, vertical_align, REFLOW) -CSS_PROP(visibility, visibility, REFLOW) // reflow for collapse -CSS_PROP(voice-family, voice_family, AURAL) -CSS_PROP(volume, volume, AURAL) -CSS_PROP(white-space, white_space, REFLOW) -CSS_PROP(widows, widows, REFLOW) -CSS_PROP(width, width, REFLOW) -CSS_PROP(word-spacing, word_spacing, REFLOW) -CSS_PROP(z-index, z_index, REFLOW) +CSS_PROP(-moz-appearance, appearance, MozAppearance, REFLOW) +CSS_PROP(-moz-border-radius, _moz_border_radius, MozBorderRadius, VISUAL) +CSS_PROP(-moz-border-radius-topleft, _moz_border_radius_topLeft, MozBorderRadiusTopleft, VISUAL) +CSS_PROP(-moz-border-radius-topright, _moz_border_radius_topRight, MozBorderRadiusTopright, VISUAL) +CSS_PROP(-moz-border-radius-bottomleft, _moz_border_radius_bottomLeft, MozBorderRadiusBottomleft, VISUAL) +CSS_PROP(-moz-border-radius-bottomright, _moz_border_radius_bottomRight, MozBorderRadiusBottomright, VISUAL) +CSS_PROP(-moz-outline-radius, _moz_outline_radius, MozOutlineRadius, VISUAL) +CSS_PROP(-moz-outline-radius-topleft, _moz_outline_radius_topLeft, MozOutlineRadiusTopleft, VISUAL) +CSS_PROP(-moz-outline-radius-topright, _moz_outline_radius_topRight, MozOutlineRadiusTopright, VISUAL) +CSS_PROP(-moz-outline-radius-bottomleft, _moz_outline_radius_bottomLeft, MozOutlineRadiusBottomleft, VISUAL) +CSS_PROP(-moz-outline-radius-bottomright, _moz_outline_radius_bottomRight, MozOutlineRadiusBottomright, VISUAL) +CSS_PROP(azimuth, azimuth, Azimuth, AURAL) +CSS_PROP(background, background, Background, VISUAL) +CSS_PROP(background-attachment, background_attachment, BackgroundAttachment, FRAMECHANGE) +CSS_PROP(background-color, background_color, BackgroundColor, VISUAL) +CSS_PROP(background-image, background_image, BackgroundImage, VISUAL) +CSS_PROP(background-position, background_position, BackgroundPosition, VISUAL) +CSS_PROP(background-repeat, background_repeat, BackgroundRepeat, VISUAL) +CSS_PROP_INTERNAL(-x-background-x-position, background_x_position, BackgroundXPosition, VISUAL) // XXX bug 3935 +CSS_PROP_INTERNAL(-x-background-y-position, background_y_position, BackgroundYPosition, VISUAL) // XXX bug 3935 +CSS_PROP(-moz-binding, binding, MozBinding, FRAMECHANGE) // XXX bug 3935 +CSS_PROP(border, border, Border, REFLOW) +CSS_PROP(border-bottom, border_bottom, BorderBottom, REFLOW) +CSS_PROP(border-bottom-color, border_bottom_color, BorderBottomColor, VISUAL) +CSS_PROP(-moz-border-bottom-colors, border_bottom_colors, MozBorderBottomColors, VISUAL) +CSS_PROP(border-bottom-style, border_bottom_style, BorderBottomStyle, REFLOW) // on/off will need reflow +CSS_PROP(border-bottom-width, border_bottom_width, BorderBottomWidth, REFLOW) +CSS_PROP(border-collapse, border_collapse, BorderCollapse, FRAMECHANGE) +CSS_PROP(border-color, border_color, BorderColor, VISUAL) +CSS_PROP(border-left, border_left, BorderLeft, REFLOW) +CSS_PROP(border-left-color, border_left_color, BorderLeftColor, VISUAL) +CSS_PROP(-moz-border-left-colors, border_left_colors, MozBorderLeftColors, VISUAL) +CSS_PROP(border-left-style, border_left_style, BorderLeftStyle, REFLOW) // on/off will need reflow +CSS_PROP(border-left-width, border_left_width, BorderLeftWidth, REFLOW) +CSS_PROP(border-right, border_right, BorderRight, REFLOW) +CSS_PROP(border-right-color, border_right_color, BorderRightColor, VISUAL) +CSS_PROP(-moz-border-right-colors, border_right_colors, MozBorderRightColors, VISUAL) +CSS_PROP(border-right-style, border_right_style, BorderRightStyle, REFLOW) // on/off will need reflow +CSS_PROP(border-right-width, border_right_width, BorderRightWidth, REFLOW) +CSS_PROP(border-spacing, border_spacing, BorderSpacing, REFLOW) +CSS_PROP(border-style, border_style, BorderStyle, REFLOW) // on/off will need reflow +CSS_PROP(border-top, border_top, BorderTop, REFLOW) +CSS_PROP(border-top-color, border_top_color, BorderTopColor, VISUAL) +CSS_PROP(-moz-border-top-colors, border_top_colors, MozBorderTopColors, VISUAL) +CSS_PROP(border-top-style, border_top_style, BorderTopStyle, REFLOW) // on/off will need reflow +CSS_PROP(border-top-width, border_top_width, BorderTopWidth, REFLOW) +CSS_PROP(border-width, border_width, BorderWidth, REFLOW) +CSS_PROP_INTERNAL(-x-border-x-spacing, border_x_spacing, BorderXSpacing, REFLOW) // XXX bug 3935 +CSS_PROP_INTERNAL(-x-border-y-spacing, border_y_spacing, BorderYSpacing, REFLOW) // XXX bug 3935 +CSS_PROP(bottom, bottom, Bottom, REFLOW) +CSS_PROP(-moz-box-align, box_align, MozBoxAlign, REFLOW) // XXX bug 3935 +CSS_PROP(-moz-box-direction, box_direction, MozBoxDirection, REFLOW) // XXX bug 3935 +CSS_PROP(-moz-box-flex, box_flex, MozBoxFlex, REFLOW) // XXX bug 3935 +CSS_PROP(-moz-box-flex-group, box_flex_group, MozBoxFlexGroup, REFLOW) // XXX bug 3935 +CSS_PROP(-moz-box-orient, box_orient, MozBoxOrient, REFLOW) // XXX bug 3935 +CSS_PROP(-moz-box-pack, box_pack, MozBoxPack, REFLOW) // XXX bug 3935 +CSS_PROP(-moz-box-sizing, box_sizing, MozBoxSizing, REFLOW) // XXX bug 3935 +CSS_PROP(-moz-box-ordinal-group, box_ordinal_group, MozBoxOrdinalGroup, FRAMECHANGE) +CSS_PROP(caption-side, caption_side, CaptionSide, REFLOW) +CSS_PROP(clear, clear, Clear, REFLOW) +CSS_PROP(clip, clip, Clip, REFLOW) +CSS_PROP_INTERNAL(-x-clip-bottom, clip_bottom, ClipBottom, REFLOW) // XXX bug 3935 +CSS_PROP_INTERNAL(-x-clip-left, clip_left, ClipLeft, REFLOW) // XXX bug 3935 +CSS_PROP_INTERNAL(-x-clip-right, clip_right, ClipRight, REFLOW) // XXX bug 3935 +CSS_PROP_INTERNAL(-x-clip-top, clip_top, ClipTop, REFLOW) // XXX bug 3935 +CSS_PROP(color, color, Color, VISUAL) +CSS_PROP(content, content, Content, FRAMECHANGE) +CSS_PROP(counter-increment, counter_increment, CounterIncrement, REFLOW) +CSS_PROP(counter-reset, counter_reset, CounterReset, REFLOW) +CSS_PROP(-moz-counter-increment, _moz_counter_increment, MozCounterIncrement, REFLOW) // XXX bug 137285 +CSS_PROP(-moz-counter-reset, _moz_counter_reset, MozCounterReset, REFLOW) // XXX bug 137285 +CSS_PROP(cue, cue, Cue, AURAL) +CSS_PROP(cue-after, cue_after, CueAfter, AURAL) +CSS_PROP(cue-before, cue_before, CueBefore, AURAL) +CSS_PROP(cursor, cursor, Cursor, VISUAL) +CSS_PROP(direction, direction, Direction, REFLOW) +CSS_PROP(display, display, Display, FRAMECHANGE) +CSS_PROP(elevation, elevation, Elevation, AURAL) +CSS_PROP(empty-cells, empty_cells, EmptyCells, VISUAL) +CSS_PROP(float, float, CssFloat, FRAMECHANGE) +CSS_PROP(-moz-float-edge, float_edge, MozFloatEdge, REFLOW) // XXX bug 3935 +CSS_PROP(font, font, Font, REFLOW) +CSS_PROP(font-family, font_family, FontFamily, REFLOW) +CSS_PROP(font-size, font_size, FontSize, REFLOW) +CSS_PROP(font-size-adjust, font_size_adjust, FontSizeAdjust, REFLOW) +CSS_PROP(font-stretch, font_stretch, FontStretch, REFLOW) +CSS_PROP(font-style, font_style, FontStyle, REFLOW) +CSS_PROP(font-variant, font_variant, FontVariant, REFLOW) +CSS_PROP(font-weight, font_weight, FontWeight, REFLOW) +CSS_PROP(-moz-force-broken-image-icon, force_broken_image_icon, MozForceBrokenImageIcon, FRAMECHANGE) // bug 58646 +CSS_PROP(height, height, Height, REFLOW) +CSS_PROP(-moz-image-region, image_region, MozImageRegion, REFLOW) +CSS_PROP_INTERNAL(-x-image-region-bottom, image_region_bottom, MozImageRegionBottom, REFLOW) +CSS_PROP_INTERNAL(-x-image-region-left, image_region_left, MozImageRegionLeft, REFLOW) +CSS_PROP_INTERNAL(-x-image-region-right, image_region_right, MozImageRegionRight, REFLOW) +CSS_PROP_INTERNAL(-x-image-region-top, image_region_top, MozImageRegionTop, REFLOW) +CSS_PROP(-moz-key-equivalent, key_equivalent, MozKeyEquivalent, CONTENT) // This will need some other notification, but what? // XXX bug 3935 +CSS_PROP(left, left, Left, REFLOW) +CSS_PROP(letter-spacing, letter_spacing, LetterSpacing, REFLOW) +CSS_PROP(line-height, line_height, LineHeight, REFLOW) +CSS_PROP(list-style, list_style, ListStyle, REFLOW) +CSS_PROP(list-style-image, list_style_image, ListStyleImage, REFLOW) +CSS_PROP(list-style-position, list_style_position, ListStylePosition, REFLOW) +CSS_PROP(list-style-type, list_style_type, ListStyleType, REFLOW) +CSS_PROP(margin, margin, Margin, REFLOW) +CSS_PROP(margin-bottom, margin_bottom, MarginBottom, REFLOW) +CSS_PROP(margin-left, margin_left, MarginLeft, REFLOW) +CSS_PROP(margin-right, margin_right, MarginRight, REFLOW) +CSS_PROP(margin-top, margin_top, MarginTop, REFLOW) +CSS_PROP(marker-offset, marker_offset, MarkerOffset, REFLOW) +CSS_PROP(marks, marks, Marks, VISUAL) +CSS_PROP(max-height, max_height, MaxHeight, REFLOW) +CSS_PROP(max-width, max_width, MaxWidth, REFLOW) +CSS_PROP(min-height, min_height, MinHeight, REFLOW) +CSS_PROP(min-width, min_width, MinWidth, REFLOW) +CSS_PROP(-moz-opacity, opacity, MozOpacity, FRAMECHANGE) // XXX bug 3935 +CSS_PROP(orphans, orphans, Orphans, REFLOW) +CSS_PROP(outline, outline, Outline, VISUAL) +CSS_PROP(outline, outline_color, OutlineColor, VISUAL) +CSS_PROP(outline, outline_style, OutlineStyle, VISUAL) +CSS_PROP(outline, outline_width, OutlineWidth, VISUAL) +CSS_PROP(-moz-outline, _moz_outline, MozOutline, VISUAL) // XXX This is temporary fix for nsbeta3+ Bug 48973, turning outline into -moz-outline XXX bug 48973 +CSS_PROP(-moz-outline-color, _moz_outline_color, MozOutlineColor, VISUAL) // XXX bug 48973 +CSS_PROP(-moz-outline-style, _moz_outline_style, MozOutlineStyle, VISUAL) // XXX bug 48973 +CSS_PROP(-moz-outline-width, _moz_outline_width, MozOutlineWidth, VISUAL) // XXX bug 48973 +CSS_PROP(overflow, overflow, Overflow, FRAMECHANGE) +CSS_PROP(padding, padding, Padding, REFLOW) +CSS_PROP(padding-bottom, padding_bottom, PaddingBottom, REFLOW) +CSS_PROP(padding-left, padding_left, PaddingLeft, REFLOW) +CSS_PROP(padding-right, padding_right, PaddingRight, REFLOW) +CSS_PROP(padding-top, padding_top, PaddingTop, REFLOW) +CSS_PROP(page, page, Page, REFLOW) +CSS_PROP(page-break-after, page_break_after, PageBreakAfter, REFLOW) +CSS_PROP(page-break-before, page_break_before, PageBreakBefore, REFLOW) +CSS_PROP(page-break-inside, page_break_inside, PageBreakInside, REFLOW) +CSS_PROP(pause, pause, Pause, AURAL) +CSS_PROP(pause-after, pause_after, PauseAfter, AURAL) +CSS_PROP(pause-before, pause_before, PauseBefore, AURAL) +CSS_PROP(pitch, pitch, Pitch, AURAL) +CSS_PROP(pitch-range, pitch_range, PitchRange, AURAL) +CSS_PROP(play-during, play_during, PlayDuring, AURAL) +CSS_PROP_INTERNAL(-x-play-during-flags, play_during_flags, PlayDuringFlags, AURAL) // XXX why is this here? +CSS_PROP(position, position, Position, FRAMECHANGE) +CSS_PROP(quotes, quotes, Quotes, REFLOW) +CSS_PROP_INTERNAL(-x-quotes-close, quotes_close, QuotesClose, REFLOW) // XXX bug 3935 +CSS_PROP_INTERNAL(-x-quotes-open, quotes_open, QuotesOpen, REFLOW) // XXX bug 3935 +CSS_PROP(-moz-resizer, resizer, MozResizer, FRAMECHANGE) // XXX bug 3935 +CSS_PROP(richness, richness, Richness, AURAL) +CSS_PROP(right, right, Right, REFLOW) +CSS_PROP(size, size, Size, REFLOW) +CSS_PROP_INTERNAL(-x-size-height, size_height, SizeHeight, REFLOW) // XXX bug 3935 +CSS_PROP_INTERNAL(-x-size-width, size_width, SizeWidth, REFLOW) // XXX bug 3935 +CSS_PROP(speak, speak, Speak, AURAL) +CSS_PROP(speak-header, speak_header, SpeakHeader, AURAL) +CSS_PROP(speak-numeral, speak_numeral, SpeakNumeral, AURAL) +CSS_PROP(speak-punctuation, speak_punctuation, SpeakPunctuation, AURAL) +CSS_PROP(speech-rate, speech_rate, SpeechRate, AURAL) +CSS_PROP(stress, stress, Stress, AURAL) +CSS_PROP(table-layout, table_layout, TableLayout, REFLOW) +CSS_PROP(text-align, text_align, TextAlign, REFLOW) +CSS_PROP(text-decoration, text_decoration, TextDecoration, VISUAL) +CSS_PROP(text-indent, text_indent, TextIndent, REFLOW) +CSS_PROP(text-shadow, text_shadow, TextShadow, VISUAL) +CSS_PROP_INTERNAL(-x-text-shadow-color, text_shadow_color, TextShadowColor, VISUAL) // XXX bug 3935 +CSS_PROP_INTERNAL(-x-text-shadow-radius, text_shadow_radius, TextShadowRadius, VISUAL) // XXX bug 3935 +CSS_PROP_INTERNAL(-x-text-shadow-x, text_shadow_x, TextShadowX, VISUAL) // XXX bug 3935 +CSS_PROP_INTERNAL(-x-text-shadow-y, text_shadow_y, TextShadowY, VISUAL) // XXX bug 3935 +CSS_PROP(text-transform, text_transform, TextTransform, REFLOW) +CSS_PROP(top, top, Top, REFLOW) +CSS_PROP(unicode-bidi, unicode_bidi, UnicodeBidi, REFLOW) +CSS_PROP(-moz-user-focus, user_focus, MozUserFocus, CONTENT) // XXX bug 3935 +CSS_PROP(-moz-user-input, user_input, MozUserInput, FRAMECHANGE) // XXX ??? // XXX bug 3935 +CSS_PROP(-moz-user-modify, user_modify, MozUserModify, FRAMECHANGE) // XXX bug 3935 +CSS_PROP(-moz-user-select, user_select, MozUserSelect, CONTENT) // XXX bug 3935 +CSS_PROP(vertical-align, vertical_align, VerticalAlign, REFLOW) +CSS_PROP(visibility, visibility, Visibility, REFLOW) // reflow for collapse +CSS_PROP(voice-family, voice_family, VoiceFamily, AURAL) +CSS_PROP(volume, volume, Volume, AURAL) +CSS_PROP(white-space, white_space, WhiteSpace, REFLOW) +CSS_PROP(widows, widows, Widows, REFLOW) +CSS_PROP(width, width, Width, REFLOW) +CSS_PROP(word-spacing, word_spacing, WordSpacing, REFLOW) +CSS_PROP(z-index, z_index, ZIndex, REFLOW) #ifdef MOZ_SVG -CSS_PROP(fill, fill, VISUAL) -CSS_PROP(fill-opacity, fill_opacity, VISUAL) -CSS_PROP(fill-rule, fill_rule, VISUAL) -CSS_PROP(stroke, stroke, VISUAL) -CSS_PROP(stroke-dasharray, stroke_dasharray, VISUAL) -CSS_PROP(stroke-dashoffset, stroke_dashoffset, VISUAL) -CSS_PROP(stroke-linecap, stroke_linecap, VISUAL) -CSS_PROP(stroke-linejoin, stroke_linejoin, VISUAL) -CSS_PROP(stroke-miterlimit, stroke_miterlimit, VISUAL) -CSS_PROP(stroke-opacity, stroke_opacity, VISUAL) -CSS_PROP(stroke-width, stroke_width, VISUAL) +// XXX treat SVG's CSS Properties as internal for now. +// Do we want to create an nsIDOMSVGCSS2Properties interface? +CSS_PROP_INTERNAL(fill, fill, Fill, VISUAL) +CSS_PROP_INTERNAL(fill-opacity, fill_opacity, FillOpacity, VISUAL) +CSS_PROP_INTERNAL(fill-rule, fill_rule, FillRule, VISUAL) +CSS_PROP_INTERNAL(stroke, stroke, Stroke, VISUAL) +CSS_PROP_INTERNAL(stroke-dasharray, stroke_dasharray, StrokeDasharray, VISUAL) +CSS_PROP_INTERNAL(stroke-dashoffset, stroke_dashoffset, StrokeDashoffset, VISUAL) +CSS_PROP_INTERNAL(stroke-linecap, stroke_linecap, StrokeLinecap, VISUAL) +CSS_PROP_INTERNAL(stroke-linejoin, stroke_linejoin, StrokeLinejoin, VISUAL) +CSS_PROP_INTERNAL(stroke-miterlimit, stroke_miterlimit, StrokeMiterlimit, VISUAL) +CSS_PROP_INTERNAL(stroke-opacity, stroke_opacity, StrokeOpacity, VISUAL) +CSS_PROP_INTERNAL(stroke-width, stroke_width, StrokeWidth, VISUAL) +#endif + +// Clean up after ourselves +#ifdef DEFINED_CSS_PROP_INTERNAL +#undef CSS_PROP_INTERNAL +#undef DEFINED_CSS_PROP_INTERNAL +#endif + +#ifdef DEFINED_CSS_PROP_NOTIMPLEMENTED +#undef CSS_PROP_NOTIMPLEMENTED +#undef DEFINED_CSS_PROP_NOTIMPLEMENTED #endif - diff --git a/mozilla/content/shared/public/nsCSSProps.h b/mozilla/content/shared/public/nsCSSProps.h index 1d0f519cc2f..8b203e993fd 100644 --- a/mozilla/content/shared/public/nsCSSProps.h +++ b/mozilla/content/shared/public/nsCSSProps.h @@ -48,7 +48,7 @@ To change the list of properties, see nsCSSPropList.h */ -#define CSS_PROP(_name, _id, _hint) eCSSProperty_##_id, +#define CSS_PROP(_name, _id, _method, _hint) eCSSProperty_##_id, enum nsCSSProperty { eCSSProperty_UNKNOWN = -1, #include "nsCSSPropList.h" diff --git a/mozilla/content/shared/src/nsCSSProps.cpp b/mozilla/content/shared/src/nsCSSProps.cpp index e70c86bc60f..9bc1ef931b6 100644 --- a/mozilla/content/shared/src/nsCSSProps.cpp +++ b/mozilla/content/shared/src/nsCSSProps.cpp @@ -48,7 +48,7 @@ #include "nsStaticNameTable.h" // define an array of all CSS properties -#define CSS_PROP(_name, _id, _hint) #_name, +#define CSS_PROP(_name, _id, _method, _hint) #_name, const char* kCSSRawProperties[] = { #include "nsCSSPropList.h" }; @@ -1018,8 +1018,8 @@ static const PRInt32 kBackgroundYPositionKTable[] = { case eCSSProperty_content: return SearchKeywordTable(aValue, kContentKTable); - case eCSSProperty_counter_increment: - case eCSSProperty_counter_reset: + case eCSSProperty__moz_counter_increment: + case eCSSProperty__moz_counter_reset: case eCSSProperty_cue: case eCSSProperty_cue_after: case eCSSProperty_cue_before: @@ -1113,16 +1113,16 @@ static const PRInt32 kBackgroundYPositionKTable[] = { case eCSSProperty_opacity: case eCSSProperty_orphans: - case eCSSProperty_outline: + case eCSSProperty__moz_outline: break; - case eCSSProperty_outline_color: + case eCSSProperty__moz_outline_color: return SearchKeywordTable(aValue, kOutlineColorKTable); - case eCSSProperty_outline_style: + case eCSSProperty__moz_outline_style: return SearchKeywordTable(aValue, kBorderStyleKTable); - case eCSSProperty_outline_width: + case eCSSProperty__moz_outline_width: return SearchKeywordTable(aValue, kBorderWidthKTable); case eCSSProperty_overflow: @@ -1286,7 +1286,7 @@ PRBool nsCSSProps::GetColorName(PRInt32 aPropValue, nsCString &aStr) } // define array of all CSS property hints -#define CSS_PROP(_name, _id, _hint) NS_STYLE_HINT_##_hint, +#define CSS_PROP(_name, _id, _method, _hint) NS_STYLE_HINT_##_hint, const nsChangeHint nsCSSProps::kHintTable[eCSSProperty_COUNT] = { #include "nsCSSPropList.h" }; diff --git a/mozilla/dom/public/idl/css/nsIDOMCSS2Properties.idl b/mozilla/dom/public/idl/css/nsIDOMCSS2Properties.idl index b29d9105663..568a3389c2a 100644 --- a/mozilla/dom/public/idl/css/nsIDOMCSS2Properties.idl +++ b/mozilla/dom/public/idl/css/nsIDOMCSS2Properties.idl @@ -414,9 +414,24 @@ interface nsIDOMCSS2Properties : nsISupports interface nsIDOMNSCSS2Properties : nsIDOMCSS2Properties { /* Non-DOM 2 extensions */ + attribute DOMString MozAppearance; + // raises(DOMException) on setting + attribute DOMString MozBinding; // raises(DOMException) on setting + attribute DOMString MozBorderBottomColors; + // raises(DOMException) on setting + + attribute DOMString MozBorderLeftColors; + // raises(DOMException) on setting + + attribute DOMString MozBorderRightColors; + // raises(DOMException) on setting + + attribute DOMString MozBorderTopColors; + // raises(DOMException) on setting + attribute DOMString MozBorderRadius; // raises(DOMException) on setting @@ -447,15 +462,30 @@ interface nsIDOMNSCSS2Properties : nsIDOMCSS2Properties attribute DOMString MozBoxOrient; // raises(DOMException) on setting + attribute DOMString MozBoxOrdinalGroup; + // raises(DOMException) on setting + attribute DOMString MozBoxPack; // raises(DOMException) on setting attribute DOMString MozBoxSizing; // raises(DOMException) on setting + attribute DOMString MozCounterIncrement; + // raises(DOMException) on setting + + attribute DOMString MozCounterReset; + // raises(DOMException) on setting + attribute DOMString MozFloatEdge; // raises(DOMException) on setting + attribute DOMString MozForceBrokenImageIcon; + // raises(DOMException) on setting + + attribute DOMString MozImageRegion; + // raises(DOMException) on setting + attribute DOMString MozKeyEquivalent; // raises(DOMException) on setting diff --git a/mozilla/dom/src/base/nsDOMClassInfo.cpp b/mozilla/dom/src/base/nsDOMClassInfo.cpp index 591c552576c..bcc6ce37b99 100644 --- a/mozilla/dom/src/base/nsDOMClassInfo.cpp +++ b/mozilla/dom/src/base/nsDOMClassInfo.cpp @@ -1803,6 +1803,8 @@ nsDOMClassInfo::Init() DOM_CLASSINFO_MAP_BEGIN_NO_CLASS_IF(ComputedCSSStyleDeclaration, nsIDOMCSSStyleDeclaration) DOM_CLASSINFO_MAP_ENTRY(nsIDOMCSSStyleDeclaration) + DOM_CLASSINFO_MAP_ENTRY(nsIDOMCSS2Properties) + DOM_CLASSINFO_MAP_ENTRY(nsIDOMNSCSS2Properties) DOM_CLASSINFO_MAP_END DOM_CLASSINFO_MAP_BEGIN_NO_CLASS_IF(ROCSSPrimitiveValue, diff --git a/mozilla/layout/style/nsCSSDeclaration.cpp b/mozilla/layout/style/nsCSSDeclaration.cpp index d38ee70f5a4..02269ec745a 100644 --- a/mozilla/layout/style/nsCSSDeclaration.cpp +++ b/mozilla/layout/style/nsCSSDeclaration.cpp @@ -550,9 +550,9 @@ void nsCSSMargin::List(FILE* out, PRInt32 aIndent) const for (PRInt32 index = aIndent; --index >= 0; ) fputs(" ", out); nsAutoString buffer; - mOutlineWidth.AppendToString(buffer, eCSSProperty_outline_width); - mOutlineColor.AppendToString(buffer, eCSSProperty_outline_color); - mOutlineStyle.AppendToString(buffer, eCSSProperty_outline_style); + mOutlineWidth.AppendToString(buffer, eCSSProperty__moz_outline_width); + mOutlineColor.AppendToString(buffer, eCSSProperty__moz_outline_color); + mOutlineStyle.AppendToString(buffer, eCSSProperty__moz_outline_style); if (nsnull != mOutlineRadius) { static const nsCSSProperty trbl[] = { eCSSProperty__moz_outline_radius_topLeft, @@ -912,13 +912,13 @@ void nsCSSContent::List(FILE* out, PRInt32 aIndent) const } nsCSSCounterData* counter = mCounterIncrement; while (nsnull != counter) { - counter->mCounter.AppendToString(buffer, eCSSProperty_counter_increment); + counter->mCounter.AppendToString(buffer, eCSSProperty__moz_counter_increment); counter->mValue.AppendToString(buffer, eCSSProperty_UNKNOWN); counter = counter->mNext; } counter = mCounterReset; while (nsnull != counter) { - counter->mCounter.AppendToString(buffer, eCSSProperty_counter_reset); + counter->mCounter.AppendToString(buffer, eCSSProperty__moz_counter_reset); counter->mValue.AppendToString(buffer, eCSSProperty_UNKNOWN); counter = counter->mNext; } @@ -1711,15 +1711,15 @@ nsCSSDeclaration::AppendValue(nsCSSProperty aProperty, const nsCSSValue& aValue) break; } - case eCSSProperty_outline_width: - case eCSSProperty_outline_color: - case eCSSProperty_outline_style: + case eCSSProperty__moz_outline_width: + case eCSSProperty__moz_outline_color: + case eCSSProperty__moz_outline_style: case eCSSProperty_float_edge: { CSS_ENSURE(Margin) { switch (aProperty) { - case eCSSProperty_outline_width: theMargin->mOutlineWidth = aValue; break; - case eCSSProperty_outline_color: theMargin->mOutlineColor = aValue; break; - case eCSSProperty_outline_style: theMargin->mOutlineStyle = aValue; break; + case eCSSProperty__moz_outline_width: theMargin->mOutlineWidth = aValue; break; + case eCSSProperty__moz_outline_color: theMargin->mOutlineColor = aValue; break; + case eCSSProperty__moz_outline_style: theMargin->mOutlineStyle = aValue; break; case eCSSProperty_float_edge: theMargin->mFloatEdge = aValue; break; CSS_BOGUS_DEFAULT; // make compiler happy } @@ -1870,8 +1870,8 @@ nsCSSDeclaration::AppendValue(nsCSSProperty aProperty, const nsCSSValue& aValue) // nsCSSContent case eCSSProperty_content: - case eCSSProperty_counter_increment: - case eCSSProperty_counter_reset: + case eCSSProperty__moz_counter_increment: + case eCSSProperty__moz_counter_reset: case eCSSProperty_marker_offset: case eCSSProperty_quotes_open: case eCSSProperty_quotes_close: { @@ -1883,13 +1883,13 @@ nsCSSDeclaration::AppendValue(nsCSSProperty aProperty, const nsCSSValue& aValue) CSS_IF_DELETE(theContent->mContent->mNext); } break; - case eCSSProperty_counter_increment: + case eCSSProperty__moz_counter_increment: CSS_ENSURE_DATA(theContent->mCounterIncrement, nsCSSCounterData) { theContent->mCounterIncrement->mCounter = aValue; CSS_IF_DELETE(theContent->mCounterIncrement->mNext); } break; - case eCSSProperty_counter_reset: + case eCSSProperty__moz_counter_reset: CSS_ENSURE_DATA(theContent->mCounterReset, nsCSSCounterData) { theContent->mCounterReset->mCounter = aValue; CSS_IF_DELETE(theContent->mCounterReset->mNext); @@ -2066,7 +2066,7 @@ nsCSSDeclaration::AppendValue(nsCSSProperty aProperty, const nsCSSValue& aValue) case eCSSProperty_image_region: case eCSSProperty_list_style: case eCSSProperty_margin: - case eCSSProperty_outline: + case eCSSProperty__moz_outline: case eCSSProperty_padding: case eCSSProperty_pause: case eCSSProperty_quotes: @@ -2138,7 +2138,7 @@ nsCSSDeclaration::AppendStructValue(nsCSSProperty aProperty, void* aStruct) break; } - case eCSSProperty_counter_increment: { + case eCSSProperty__moz_counter_increment: { CSS_ENSURE(Content) { CSS_IF_DELETE(theContent->mCounterIncrement); theContent->mCounterIncrement = (nsCSSCounterData*)aStruct; @@ -2146,7 +2146,7 @@ nsCSSDeclaration::AppendStructValue(nsCSSProperty aProperty, void* aStruct) break; } - case eCSSProperty_counter_reset: { + case eCSSProperty__moz_counter_reset: { CSS_ENSURE(Content) { CSS_IF_DELETE(theContent->mCounterReset); theContent->mCounterReset = (nsCSSCounterData*)aStruct; @@ -2644,17 +2644,17 @@ nsCSSDeclaration::SetValueImportant(nsCSSProperty aProperty) break; } - case eCSSProperty_outline_width: - case eCSSProperty_outline_color: - case eCSSProperty_outline_style: + case eCSSProperty__moz_outline_width: + case eCSSProperty__moz_outline_color: + case eCSSProperty__moz_outline_style: case eCSSProperty_float_edge: { CSS_VARONSTACK_GET(Margin); if (nsnull != theMargin) { CSS_ENSURE_IMPORTANT(Margin) { switch (aProperty) { - CSS_CASE_IMPORTANT(eCSSProperty_outline_width, Margin, mOutlineWidth); - CSS_CASE_IMPORTANT(eCSSProperty_outline_color, Margin, mOutlineColor); - CSS_CASE_IMPORTANT(eCSSProperty_outline_style, Margin, mOutlineStyle); + CSS_CASE_IMPORTANT(eCSSProperty__moz_outline_width, Margin, mOutlineWidth); + CSS_CASE_IMPORTANT(eCSSProperty__moz_outline_color, Margin, mOutlineColor); + CSS_CASE_IMPORTANT(eCSSProperty__moz_outline_style, Margin, mOutlineStyle); CSS_CASE_IMPORTANT(eCSSProperty_float_edge, Margin, mFloatEdge); CSS_BOGUS_DEFAULT; // make compiler happy } @@ -2846,7 +2846,7 @@ nsCSSDeclaration::SetValueImportant(nsCSSProperty aProperty) break; } - case eCSSProperty_counter_increment: { + case eCSSProperty__moz_counter_increment: { CSS_VARONSTACK_GET(Content); if (nsnull != theContent) { if (nsnull != theContent->mCounterIncrement) { @@ -2860,7 +2860,7 @@ nsCSSDeclaration::SetValueImportant(nsCSSProperty aProperty) break; } - case eCSSProperty_counter_reset: { + case eCSSProperty__moz_counter_reset: { CSS_VARONSTACK_GET(Content); if (nsnull != theContent) { if (nsnull != theContent->mCounterReset) { @@ -3134,10 +3134,10 @@ nsCSSDeclaration::SetValueImportant(nsCSSProperty aProperty) SetValueImportant(eCSSProperty_margin_bottom); SetValueImportant(eCSSProperty_margin_left); break; - case eCSSProperty_outline: - SetValueImportant(eCSSProperty_outline_color); - SetValueImportant(eCSSProperty_outline_style); - SetValueImportant(eCSSProperty_outline_width); + case eCSSProperty__moz_outline: + SetValueImportant(eCSSProperty__moz_outline_color); + SetValueImportant(eCSSProperty__moz_outline_style); + SetValueImportant(eCSSProperty__moz_outline_width); break; case eCSSProperty_padding: SetValueImportant(eCSSProperty_padding_top); @@ -3530,15 +3530,15 @@ nsCSSDeclaration::RemoveProperty(nsCSSProperty aProperty) break; } - case eCSSProperty_outline_width: - case eCSSProperty_outline_color: - case eCSSProperty_outline_style: + case eCSSProperty__moz_outline_width: + case eCSSProperty__moz_outline_color: + case eCSSProperty__moz_outline_style: case eCSSProperty_float_edge: { CSS_CHECK(Margin) { switch (aProperty) { - case eCSSProperty_outline_width: theMargin->mOutlineWidth.Reset(); break; - case eCSSProperty_outline_color: theMargin->mOutlineColor.Reset(); break; - case eCSSProperty_outline_style: theMargin->mOutlineStyle.Reset(); break; + case eCSSProperty__moz_outline_width: theMargin->mOutlineWidth.Reset(); break; + case eCSSProperty__moz_outline_color: theMargin->mOutlineColor.Reset(); break; + case eCSSProperty__moz_outline_style: theMargin->mOutlineStyle.Reset(); break; case eCSSProperty_float_edge: theMargin->mFloatEdge.Reset(); break; CSS_BOGUS_DEFAULT; // make compiler happy } @@ -3688,8 +3688,8 @@ nsCSSDeclaration::RemoveProperty(nsCSSProperty aProperty) // nsCSSContent case eCSSProperty_content: - case eCSSProperty_counter_increment: - case eCSSProperty_counter_reset: + case eCSSProperty__moz_counter_increment: + case eCSSProperty__moz_counter_reset: case eCSSProperty_marker_offset: case eCSSProperty_quotes_open: case eCSSProperty_quotes_close: { @@ -3701,13 +3701,13 @@ nsCSSDeclaration::RemoveProperty(nsCSSProperty aProperty) CSS_IF_DELETE(theContent->mContent->mNext); } break; - case eCSSProperty_counter_increment: + case eCSSProperty__moz_counter_increment: CSS_CHECK_DATA(theContent->mCounterIncrement, nsCSSCounterData) { theContent->mCounterIncrement->mCounter.Reset(); CSS_IF_DELETE(theContent->mCounterIncrement->mNext); } break; - case eCSSProperty_counter_reset: + case eCSSProperty__moz_counter_reset: CSS_CHECK_DATA(theContent->mCounterReset, nsCSSCounterData) { theContent->mCounterReset->mCounter.Reset(); CSS_IF_DELETE(theContent->mCounterReset->mNext); @@ -3925,10 +3925,10 @@ nsCSSDeclaration::RemoveProperty(nsCSSProperty aProperty) } break; } - case eCSSProperty_outline: - RemoveProperty(eCSSProperty_outline_color); - RemoveProperty(eCSSProperty_outline_style); - RemoveProperty(eCSSProperty_outline_width); + case eCSSProperty__moz_outline: + RemoveProperty(eCSSProperty__moz_outline_color); + RemoveProperty(eCSSProperty__moz_outline_style); + RemoveProperty(eCSSProperty__moz_outline_width); break; case eCSSProperty_padding: { CSS_CHECK(Margin) { @@ -4366,16 +4366,16 @@ nsCSSDeclaration::GetValue(nsCSSProperty aProperty, nsCSSValue& aValue) break; } - case eCSSProperty_outline_width: - case eCSSProperty_outline_color: - case eCSSProperty_outline_style: + case eCSSProperty__moz_outline_width: + case eCSSProperty__moz_outline_color: + case eCSSProperty__moz_outline_style: case eCSSProperty_float_edge: { CSS_VARONSTACK_GET(Margin); if (nsnull != theMargin) { switch (aProperty) { - case eCSSProperty_outline_width: aValue = theMargin->mOutlineWidth; break; - case eCSSProperty_outline_color: aValue = theMargin->mOutlineColor; break; - case eCSSProperty_outline_style: aValue = theMargin->mOutlineStyle; break; + case eCSSProperty__moz_outline_width: aValue = theMargin->mOutlineWidth; break; + case eCSSProperty__moz_outline_color: aValue = theMargin->mOutlineColor; break; + case eCSSProperty__moz_outline_style: aValue = theMargin->mOutlineStyle; break; case eCSSProperty_float_edge: aValue = theMargin->mFloatEdge; break; CSS_BOGUS_DEFAULT; // make compiler happy } @@ -4557,8 +4557,8 @@ nsCSSDeclaration::GetValue(nsCSSProperty aProperty, nsCSSValue& aValue) // nsCSSContent case eCSSProperty_content: - case eCSSProperty_counter_increment: - case eCSSProperty_counter_reset: + case eCSSProperty__moz_counter_increment: + case eCSSProperty__moz_counter_reset: case eCSSProperty_marker_offset: case eCSSProperty_quotes_open: case eCSSProperty_quotes_close: { @@ -4570,12 +4570,12 @@ nsCSSDeclaration::GetValue(nsCSSProperty aProperty, nsCSSValue& aValue) aValue = theContent->mContent->mValue; } break; - case eCSSProperty_counter_increment: + case eCSSProperty__moz_counter_increment: if (nsnull != theContent->mCounterIncrement) { aValue = theContent->mCounterIncrement->mCounter; } break; - case eCSSProperty_counter_reset: + case eCSSProperty__moz_counter_reset: if (nsnull != theContent->mCounterReset) { aValue = theContent->mCounterReset->mCounter; } @@ -4766,7 +4766,7 @@ nsCSSDeclaration::GetValue(nsCSSProperty aProperty, nsCSSValue& aValue) case eCSSProperty_image_region: case eCSSProperty_list_style: case eCSSProperty_margin: - case eCSSProperty_outline: + case eCSSProperty__moz_outline: case eCSSProperty_padding: case eCSSProperty_pause: case eCSSProperty_quotes: @@ -5131,10 +5131,10 @@ nsCSSDeclaration::GetValue(nsCSSProperty aProperty, } break; } - case eCSSProperty_outline: - if (AppendValueToString(eCSSProperty_outline_color, aValue)) aValue.Append(PRUnichar(' ')); - if (AppendValueToString(eCSSProperty_outline_style, aValue)) aValue.Append(PRUnichar(' ')); - AppendValueToString(eCSSProperty_outline_width, aValue); + case eCSSProperty__moz_outline: + if (AppendValueToString(eCSSProperty__moz_outline_color, aValue)) aValue.Append(PRUnichar(' ')); + if (AppendValueToString(eCSSProperty__moz_outline_style, aValue)) aValue.Append(PRUnichar(' ')); + AppendValueToString(eCSSProperty__moz_outline_width, aValue); break; case eCSSProperty_padding: { CSS_VARONSTACK_GET(Margin); @@ -5279,15 +5279,15 @@ nsCSSDeclaration::GetValue(nsCSSProperty aProperty, } break; } - case eCSSProperty_counter_increment: { + case eCSSProperty__moz_counter_increment: { CSS_VARONSTACK_GET(Content); if ((nsnull != theContent) && (nsnull != theContent->mCounterIncrement)) { nsCSSCounterData* data = theContent->mCounterIncrement; do { - if (AppendValueToString(eCSSProperty_counter_increment, data->mCounter, aValue)) { + if (AppendValueToString(eCSSProperty__moz_counter_increment, data->mCounter, aValue)) { if (HAS_VALUE(data, mValue)) { aValue.Append(PRUnichar(' ')); - AppendValueToString(eCSSProperty_counter_increment, data->mValue, aValue); + AppendValueToString(eCSSProperty__moz_counter_increment, data->mValue, aValue); } } data = data->mNext; @@ -5298,15 +5298,15 @@ nsCSSDeclaration::GetValue(nsCSSProperty aProperty, } break; } - case eCSSProperty_counter_reset: { + case eCSSProperty__moz_counter_reset: { CSS_VARONSTACK_GET(Content); if ((nsnull != theContent) && (nsnull != theContent->mCounterReset)) { nsCSSCounterData* data = theContent->mCounterReset; do { - if (AppendValueToString(eCSSProperty_counter_reset, data->mCounter, aValue)) { + if (AppendValueToString(eCSSProperty__moz_counter_reset, data->mCounter, aValue)) { if (HAS_VALUE(data, mValue)) { aValue.Append(PRUnichar(' ')); - AppendValueToString(eCSSProperty_counter_reset, data->mValue, aValue); + AppendValueToString(eCSSProperty__moz_counter_reset, data->mValue, aValue); } } data = data->mNext; diff --git a/mozilla/layout/style/nsCSSParser.cpp b/mozilla/layout/style/nsCSSParser.cpp index 83e3e8bdaf7..79c97fb3860 100644 --- a/mozilla/layout/style/nsCSSParser.cpp +++ b/mozilla/layout/style/nsCSSParser.cpp @@ -3581,8 +3581,8 @@ PRBool CSSParserImpl::ParseProperty(PRInt32& aErrorCode, return ParseClip(aErrorCode, aDeclaration, aChangeHint); case eCSSProperty_content: return ParseContent(aErrorCode, aDeclaration, aChangeHint); - case eCSSProperty_counter_increment: - case eCSSProperty_counter_reset: + case eCSSProperty__moz_counter_increment: + case eCSSProperty__moz_counter_reset: return ParseCounterData(aErrorCode, aDeclaration, aPropID, aChangeHint); case eCSSProperty_cue: return ParseCue(aErrorCode, aDeclaration, aChangeHint); @@ -3597,7 +3597,7 @@ PRBool CSSParserImpl::ParseProperty(PRInt32& aErrorCode, case eCSSProperty_margin: return ParseMargin(aErrorCode, aDeclaration, aChangeHint); #ifdef ENABLE_OUTLINE - case eCSSProperty_outline: + case eCSSProperty__moz_outline: return ParseOutline(aErrorCode, aDeclaration, aChangeHint); #endif case eCSSProperty_padding: @@ -3700,8 +3700,8 @@ PRBool CSSParserImpl::ParseSingleValueProperty(PRInt32& aErrorCode, case eCSSProperty_border_width: case eCSSProperty_clip: case eCSSProperty_content: - case eCSSProperty_counter_increment: - case eCSSProperty_counter_reset: + case eCSSProperty__moz_counter_increment: + case eCSSProperty__moz_counter_reset: case eCSSProperty_cue: case eCSSProperty_cursor: case eCSSProperty_font: @@ -3709,7 +3709,7 @@ PRBool CSSParserImpl::ParseSingleValueProperty(PRInt32& aErrorCode, case eCSSProperty_list_style: case eCSSProperty_margin: #ifdef ENABLE_OUTLINE - case eCSSProperty_outline: + case eCSSProperty__moz_outline: #endif case eCSSProperty_padding: case eCSSProperty_pause: @@ -3958,13 +3958,13 @@ PRBool CSSParserImpl::ParseSingleValueProperty(PRInt32& aErrorCode, case eCSSProperty_widows: return ParseVariant(aErrorCode, aValue, VARIANT_HI, nsnull); #ifdef ENABLE_OUTLINE - case eCSSProperty_outline_color: + case eCSSProperty__moz_outline_color: return ParseVariant(aErrorCode, aValue, VARIANT_HCK, nsCSSProps::kOutlineColorKTable); - case eCSSProperty_outline_style: + case eCSSProperty__moz_outline_style: return ParseVariant(aErrorCode, aValue, VARIANT_HOK, nsCSSProps::kBorderStyleKTable); - case eCSSProperty_outline_width: + case eCSSProperty__moz_outline_width: return ParseVariant(aErrorCode, aValue, VARIANT_HKL, nsCSSProps::kBorderWidthKTable); #endif @@ -5130,9 +5130,9 @@ PRBool CSSParserImpl::ParseOutline(PRInt32& aErrorCode, nsCSSDeclaration* aDecla { const PRInt32 numProps = 3; static const nsCSSProperty kOutlineIDs[] = { - eCSSProperty_outline_color, - eCSSProperty_outline_style, - eCSSProperty_outline_width + eCSSProperty__moz_outline_color, + eCSSProperty__moz_outline_style, + eCSSProperty__moz_outline_width }; nsCSSValue values[numProps]; diff --git a/mozilla/layout/style/nsCSSPropList.h b/mozilla/layout/style/nsCSSPropList.h index 9f83ac2ab01..5615b637c2d 100644 --- a/mozilla/layout/style/nsCSSPropList.h +++ b/mozilla/layout/style/nsCSSPropList.h @@ -41,8 +41,8 @@ This file contains the list of all parsed CSS properties See nsCSSProps.h for access to the enum values for properties - It is designed to be used as inline input to nsCSSProps.cpp *only* - through the magic of C preprocessing. + It is designed to be used as inline input through the magic of + C preprocessing. All entries must be enclosed in the macro CSS_PROP which will have cruel and unusual things done to it @@ -52,19 +52,38 @@ Requirements: - Entries are in the form: (name,id,effect). 'id' must always be the same as - 'name' except that all hyphens ('-') in 'name' are converted to underscores - ('_') in 'id'. This lets us do nice things with the macros without having to - copy/convert strings at runtime. - - 'name' entries *must* use only lowercase characters. + Entries are in the form: (name, id, method, hint). + + 'name' entries represent a CSS property name and *must* use only + lowercase characters. + + 'id' must always be the same as 'name' except that all hyphens ('-') + in 'name' are converted to underscores ('_') in 'id'. This lets us + do nice things with the macros without having to copy/convert strings + at runtime. + + 'method' is designed to be as input for CSS2Properties and similar callers. + It must always be the same as 'name' except it must use InterCaps and all + hyphens ('-') must be removed. + + 'hint' says what needs to be recomputed when the property changes. + + ** Break these invariants and bad things will happen. ** - ** Break these invariants and bad things will happen. ** - - The third argument says what needs to be recomputed when the property - changes. ******/ +// Assume the user wants internal properties, but not unimplemented ones +#ifndef CSS_PROP_INTERNAL +#define CSS_PROP_INTERNAL(_name, _id, _method, _hint) \ + CSS_PROP(_name, _id, _method, _hint) +#define DEFINED_CSS_PROP_INTERNAL +#endif + +#ifndef CSS_PROP_NOTIMPLEMENTED +#define CSS_PROP_NOTIMPLEMENTED(_name, _id, _method, _hint) /* nothing */ +#define DEFINED_CSS_PROP_NOTIMPLEMENTED +#endif + // For notes XXX bug 3935 below, the names being parsed do not correspond // to the constants used internally. It would be nice to bring the // constants into line sometime. @@ -76,194 +95,212 @@ // support them correctly the old constants need to be renamed and // new ones should be entered. -CSS_PROP(-moz-appearance, appearance, REFLOW) -CSS_PROP(-moz-border-radius, _moz_border_radius, VISUAL) -CSS_PROP(-moz-border-radius-topleft, _moz_border_radius_topLeft, VISUAL) -CSS_PROP(-moz-border-radius-topright, _moz_border_radius_topRight, VISUAL) -CSS_PROP(-moz-border-radius-bottomleft, _moz_border_radius_bottomLeft, VISUAL) -CSS_PROP(-moz-border-radius-bottomright, _moz_border_radius_bottomRight, VISUAL) -CSS_PROP(-moz-outline-radius, _moz_outline_radius, VISUAL) -CSS_PROP(-moz-outline-radius-topleft, _moz_outline_radius_topLeft, VISUAL) -CSS_PROP(-moz-outline-radius-topright, _moz_outline_radius_topRight, VISUAL) -CSS_PROP(-moz-outline-radius-bottomleft, _moz_outline_radius_bottomLeft, VISUAL) -CSS_PROP(-moz-outline-radius-bottomright, _moz_outline_radius_bottomRight, VISUAL) -CSS_PROP(azimuth, azimuth, AURAL) -CSS_PROP(background, background, VISUAL) -CSS_PROP(background-attachment, background_attachment, FRAMECHANGE) -CSS_PROP(background-color, background_color, VISUAL) -CSS_PROP(background-image, background_image, VISUAL) -CSS_PROP(background-position, background_position, VISUAL) -CSS_PROP(background-repeat, background_repeat, VISUAL) -CSS_PROP(-x-background-x-position, background_x_position, VISUAL) // XXX bug 3935 -CSS_PROP(-x-background-y-position, background_y_position, VISUAL) // XXX bug 3935 -CSS_PROP(-moz-binding, binding, FRAMECHANGE) // XXX bug 3935 -CSS_PROP(border, border, REFLOW) -CSS_PROP(border-bottom, border_bottom, REFLOW) -CSS_PROP(border-bottom-color, border_bottom_color, VISUAL) -CSS_PROP(-moz-border-bottom-colors, border_bottom_colors, VISUAL) -CSS_PROP(border-bottom-style, border_bottom_style, REFLOW) // on/off will need reflow -CSS_PROP(border-bottom-width, border_bottom_width, REFLOW) -CSS_PROP(border-collapse, border_collapse, FRAMECHANGE) -CSS_PROP(border-color, border_color, VISUAL) -CSS_PROP(border-left, border_left, REFLOW) -CSS_PROP(border-left-color, border_left_color, VISUAL) -CSS_PROP(-moz-border-left-colors, border_left_colors, VISUAL) -CSS_PROP(border-left-style, border_left_style, REFLOW) // on/off will need reflow -CSS_PROP(border-left-width, border_left_width, REFLOW) -CSS_PROP(border-right, border_right, REFLOW) -CSS_PROP(border-right-color, border_right_color, VISUAL) -CSS_PROP(-moz-border-right-colors, border_right_colors, VISUAL) -CSS_PROP(border-right-style, border_right_style, REFLOW) // on/off will need reflow -CSS_PROP(border-right-width, border_right_width, REFLOW) -CSS_PROP(border-spacing, border_spacing, REFLOW) -CSS_PROP(border-style, border_style, REFLOW) // on/off will need reflow -CSS_PROP(border-top, border_top, REFLOW) -CSS_PROP(border-top-color, border_top_color, VISUAL) -CSS_PROP(-moz-border-top-colors, border_top_colors, VISUAL) -CSS_PROP(border-top-style, border_top_style, REFLOW) // on/off will need reflow -CSS_PROP(border-top-width, border_top_width, REFLOW) -CSS_PROP(border-width, border_width, REFLOW) -CSS_PROP(-x-border-x-spacing, border_x_spacing, REFLOW) // XXX bug 3935 -CSS_PROP(-x-border-y-spacing, border_y_spacing, REFLOW) // XXX bug 3935 -CSS_PROP(bottom, bottom, REFLOW) -CSS_PROP(-moz-box-align, box_align, REFLOW) // XXX bug 3935 -CSS_PROP(-moz-box-direction, box_direction, REFLOW) // XXX bug 3935 -CSS_PROP(-moz-box-flex, box_flex, REFLOW) // XXX bug 3935 -CSS_PROP(-moz-box-flex-group, box_flex_group, REFLOW) // XXX bug 3935 -CSS_PROP(-moz-box-orient, box_orient, REFLOW) // XXX bug 3935 -CSS_PROP(-moz-box-pack, box_pack, REFLOW) // XXX bug 3935 -CSS_PROP(-moz-box-sizing, box_sizing, REFLOW) // XXX bug 3935 -CSS_PROP(-moz-box-ordinal-group, box_ordinal_group, FRAMECHANGE) -CSS_PROP(caption-side, caption_side, REFLOW) -CSS_PROP(clear, clear, REFLOW) -CSS_PROP(clip, clip, REFLOW) -CSS_PROP(-x-clip-bottom, clip_bottom, REFLOW) // XXX bug 3935 -CSS_PROP(-x-clip-left, clip_left, REFLOW) // XXX bug 3935 -CSS_PROP(-x-clip-right, clip_right, REFLOW) // XXX bug 3935 -CSS_PROP(-x-clip-top, clip_top, REFLOW) // XXX bug 3935 -CSS_PROP(color, color, VISUAL) -CSS_PROP(content, content, FRAMECHANGE) -CSS_PROP(-moz-counter-increment, counter_increment, REFLOW) // XXX bug 137285 -CSS_PROP(-moz-counter-reset, counter_reset, REFLOW) // XXX bug 137285 -CSS_PROP(cue, cue, AURAL) -CSS_PROP(cue-after, cue_after, AURAL) -CSS_PROP(cue-before, cue_before, AURAL) -CSS_PROP(cursor, cursor, VISUAL) -CSS_PROP(direction, direction, REFLOW) -CSS_PROP(display, display, FRAMECHANGE) -CSS_PROP(elevation, elevation, AURAL) -CSS_PROP(empty-cells, empty_cells, VISUAL) -CSS_PROP(float, float, FRAMECHANGE) -CSS_PROP(-moz-float-edge, float_edge, REFLOW) // XXX bug 3935 -CSS_PROP(font, font, REFLOW) -CSS_PROP(font-family, font_family, REFLOW) -CSS_PROP(font-size, font_size, REFLOW) -CSS_PROP(font-size-adjust, font_size_adjust, REFLOW) -CSS_PROP(font-stretch, font_stretch, REFLOW) -CSS_PROP(font-style, font_style, REFLOW) -CSS_PROP(font-variant, font_variant, REFLOW) -CSS_PROP(font-weight, font_weight, REFLOW) -CSS_PROP(-moz-force-broken-image-icon, force_broken_image_icon, FRAMECHANGE) // bug 58646 -CSS_PROP(height, height, REFLOW) -CSS_PROP(-moz-image-region, image_region, REFLOW) -CSS_PROP(-x-image-region-bottom, image_region_bottom, REFLOW) -CSS_PROP(-x-image-region-left, image_region_left, REFLOW) -CSS_PROP(-x-image-region-right, image_region_right, REFLOW) -CSS_PROP(-x-image-region-top, image_region_top, REFLOW) -CSS_PROP(-moz-key-equivalent, key_equivalent, CONTENT) // This will need some other notification, but what? // XXX bug 3935 -CSS_PROP(left, left, REFLOW) -CSS_PROP(letter-spacing, letter_spacing, REFLOW) -CSS_PROP(line-height, line_height, REFLOW) -CSS_PROP(list-style, list_style, REFLOW) -CSS_PROP(list-style-image, list_style_image, REFLOW) -CSS_PROP(list-style-position, list_style_position, REFLOW) -CSS_PROP(list-style-type, list_style_type, REFLOW) -CSS_PROP(margin, margin, REFLOW) -CSS_PROP(margin-bottom, margin_bottom, REFLOW) -CSS_PROP(margin-left, margin_left, REFLOW) -CSS_PROP(margin-right, margin_right, REFLOW) -CSS_PROP(margin-top, margin_top, REFLOW) -CSS_PROP(marker-offset, marker_offset, REFLOW) -CSS_PROP(marks, marks, VISUAL) -CSS_PROP(max-height, max_height, REFLOW) -CSS_PROP(max-width, max_width, REFLOW) -CSS_PROP(min-height, min_height, REFLOW) -CSS_PROP(min-width, min_width, REFLOW) -CSS_PROP(-moz-opacity, opacity, FRAMECHANGE) // XXX bug 3935 -CSS_PROP(orphans, orphans, REFLOW) -CSS_PROP(-moz-outline, outline, VISUAL) // XXX This is temporary fix for nsbeta3+ Bug 48973, turning outline into -moz-outline XXX bug 48973 -CSS_PROP(-moz-outline-color, outline_color, VISUAL) // XXX bug 48973 -CSS_PROP(-moz-outline-style, outline_style, VISUAL) // XXX bug 48973 -CSS_PROP(-moz-outline-width, outline_width, VISUAL) // XXX bug 48973 -CSS_PROP(overflow, overflow, FRAMECHANGE) -CSS_PROP(padding, padding, REFLOW) -CSS_PROP(padding-bottom, padding_bottom, REFLOW) -CSS_PROP(padding-left, padding_left, REFLOW) -CSS_PROP(padding-right, padding_right, REFLOW) -CSS_PROP(padding-top, padding_top, REFLOW) -CSS_PROP(page, page, REFLOW) -CSS_PROP(page-break-after, page_break_after, REFLOW) -CSS_PROP(page-break-before, page_break_before, REFLOW) -CSS_PROP(page-break-inside, page_break_inside, REFLOW) -CSS_PROP(pause, pause, AURAL) -CSS_PROP(pause-after, pause_after, AURAL) -CSS_PROP(pause-before, pause_before, AURAL) -CSS_PROP(pitch, pitch, AURAL) -CSS_PROP(pitch-range, pitch_range, AURAL) -CSS_PROP(play-during, play_during, AURAL) -CSS_PROP(-x-play-during-flags, play_during_flags, AURAL) // XXX why is this here? -CSS_PROP(position, position, FRAMECHANGE) -CSS_PROP(quotes, quotes, REFLOW) -CSS_PROP(-x-quotes-close, quotes_close, REFLOW) // XXX bug 3935 -CSS_PROP(-x-quotes-open, quotes_open, REFLOW) // XXX bug 3935 -CSS_PROP(-moz-resizer, resizer, FRAMECHANGE) // XXX bug 3935 -CSS_PROP(richness, richness, AURAL) -CSS_PROP(right, right, REFLOW) -CSS_PROP(size, size, REFLOW) -CSS_PROP(-x-size-height, size_height, REFLOW) // XXX bug 3935 -CSS_PROP(-x-size-width, size_width, REFLOW) // XXX bug 3935 -CSS_PROP(speak, speak, AURAL) -CSS_PROP(speak-header, speak_header, AURAL) -CSS_PROP(speak-numeral, speak_numeral, AURAL) -CSS_PROP(speak-punctuation, speak_punctuation, AURAL) -CSS_PROP(speech-rate, speech_rate, AURAL) -CSS_PROP(stress, stress, AURAL) -CSS_PROP(table-layout, table_layout, REFLOW) -CSS_PROP(text-align, text_align, REFLOW) -CSS_PROP(text-decoration, text_decoration, VISUAL) -CSS_PROP(text-indent, text_indent, REFLOW) -CSS_PROP(text-shadow, text_shadow, VISUAL) -CSS_PROP(-x-text-shadow-color, text_shadow_color, VISUAL) // XXX bug 3935 -CSS_PROP(-x-text-shadow-radius, text_shadow_radius, VISUAL) // XXX bug 3935 -CSS_PROP(-x-text-shadow-x, text_shadow_x, VISUAL) // XXX bug 3935 -CSS_PROP(-x-text-shadow-y, text_shadow_y, VISUAL) // XXX bug 3935 -CSS_PROP(text-transform, text_transform, REFLOW) -CSS_PROP(top, top, REFLOW) -CSS_PROP(unicode-bidi, unicode_bidi, REFLOW) -CSS_PROP(-moz-user-focus, user_focus, CONTENT) // XXX bug 3935 -CSS_PROP(-moz-user-input, user_input, FRAMECHANGE) // XXX ??? // XXX bug 3935 -CSS_PROP(-moz-user-modify, user_modify, FRAMECHANGE) // XXX bug 3935 -CSS_PROP(-moz-user-select, user_select, CONTENT) // XXX bug 3935 -CSS_PROP(vertical-align, vertical_align, REFLOW) -CSS_PROP(visibility, visibility, REFLOW) // reflow for collapse -CSS_PROP(voice-family, voice_family, AURAL) -CSS_PROP(volume, volume, AURAL) -CSS_PROP(white-space, white_space, REFLOW) -CSS_PROP(widows, widows, REFLOW) -CSS_PROP(width, width, REFLOW) -CSS_PROP(word-spacing, word_spacing, REFLOW) -CSS_PROP(z-index, z_index, REFLOW) +CSS_PROP(-moz-appearance, appearance, MozAppearance, REFLOW) +CSS_PROP(-moz-border-radius, _moz_border_radius, MozBorderRadius, VISUAL) +CSS_PROP(-moz-border-radius-topleft, _moz_border_radius_topLeft, MozBorderRadiusTopleft, VISUAL) +CSS_PROP(-moz-border-radius-topright, _moz_border_radius_topRight, MozBorderRadiusTopright, VISUAL) +CSS_PROP(-moz-border-radius-bottomleft, _moz_border_radius_bottomLeft, MozBorderRadiusBottomleft, VISUAL) +CSS_PROP(-moz-border-radius-bottomright, _moz_border_radius_bottomRight, MozBorderRadiusBottomright, VISUAL) +CSS_PROP(-moz-outline-radius, _moz_outline_radius, MozOutlineRadius, VISUAL) +CSS_PROP(-moz-outline-radius-topleft, _moz_outline_radius_topLeft, MozOutlineRadiusTopleft, VISUAL) +CSS_PROP(-moz-outline-radius-topright, _moz_outline_radius_topRight, MozOutlineRadiusTopright, VISUAL) +CSS_PROP(-moz-outline-radius-bottomleft, _moz_outline_radius_bottomLeft, MozOutlineRadiusBottomleft, VISUAL) +CSS_PROP(-moz-outline-radius-bottomright, _moz_outline_radius_bottomRight, MozOutlineRadiusBottomright, VISUAL) +CSS_PROP(azimuth, azimuth, Azimuth, AURAL) +CSS_PROP(background, background, Background, VISUAL) +CSS_PROP(background-attachment, background_attachment, BackgroundAttachment, FRAMECHANGE) +CSS_PROP(background-color, background_color, BackgroundColor, VISUAL) +CSS_PROP(background-image, background_image, BackgroundImage, VISUAL) +CSS_PROP(background-position, background_position, BackgroundPosition, VISUAL) +CSS_PROP(background-repeat, background_repeat, BackgroundRepeat, VISUAL) +CSS_PROP_INTERNAL(-x-background-x-position, background_x_position, BackgroundXPosition, VISUAL) // XXX bug 3935 +CSS_PROP_INTERNAL(-x-background-y-position, background_y_position, BackgroundYPosition, VISUAL) // XXX bug 3935 +CSS_PROP(-moz-binding, binding, MozBinding, FRAMECHANGE) // XXX bug 3935 +CSS_PROP(border, border, Border, REFLOW) +CSS_PROP(border-bottom, border_bottom, BorderBottom, REFLOW) +CSS_PROP(border-bottom-color, border_bottom_color, BorderBottomColor, VISUAL) +CSS_PROP(-moz-border-bottom-colors, border_bottom_colors, MozBorderBottomColors, VISUAL) +CSS_PROP(border-bottom-style, border_bottom_style, BorderBottomStyle, REFLOW) // on/off will need reflow +CSS_PROP(border-bottom-width, border_bottom_width, BorderBottomWidth, REFLOW) +CSS_PROP(border-collapse, border_collapse, BorderCollapse, FRAMECHANGE) +CSS_PROP(border-color, border_color, BorderColor, VISUAL) +CSS_PROP(border-left, border_left, BorderLeft, REFLOW) +CSS_PROP(border-left-color, border_left_color, BorderLeftColor, VISUAL) +CSS_PROP(-moz-border-left-colors, border_left_colors, MozBorderLeftColors, VISUAL) +CSS_PROP(border-left-style, border_left_style, BorderLeftStyle, REFLOW) // on/off will need reflow +CSS_PROP(border-left-width, border_left_width, BorderLeftWidth, REFLOW) +CSS_PROP(border-right, border_right, BorderRight, REFLOW) +CSS_PROP(border-right-color, border_right_color, BorderRightColor, VISUAL) +CSS_PROP(-moz-border-right-colors, border_right_colors, MozBorderRightColors, VISUAL) +CSS_PROP(border-right-style, border_right_style, BorderRightStyle, REFLOW) // on/off will need reflow +CSS_PROP(border-right-width, border_right_width, BorderRightWidth, REFLOW) +CSS_PROP(border-spacing, border_spacing, BorderSpacing, REFLOW) +CSS_PROP(border-style, border_style, BorderStyle, REFLOW) // on/off will need reflow +CSS_PROP(border-top, border_top, BorderTop, REFLOW) +CSS_PROP(border-top-color, border_top_color, BorderTopColor, VISUAL) +CSS_PROP(-moz-border-top-colors, border_top_colors, MozBorderTopColors, VISUAL) +CSS_PROP(border-top-style, border_top_style, BorderTopStyle, REFLOW) // on/off will need reflow +CSS_PROP(border-top-width, border_top_width, BorderTopWidth, REFLOW) +CSS_PROP(border-width, border_width, BorderWidth, REFLOW) +CSS_PROP_INTERNAL(-x-border-x-spacing, border_x_spacing, BorderXSpacing, REFLOW) // XXX bug 3935 +CSS_PROP_INTERNAL(-x-border-y-spacing, border_y_spacing, BorderYSpacing, REFLOW) // XXX bug 3935 +CSS_PROP(bottom, bottom, Bottom, REFLOW) +CSS_PROP(-moz-box-align, box_align, MozBoxAlign, REFLOW) // XXX bug 3935 +CSS_PROP(-moz-box-direction, box_direction, MozBoxDirection, REFLOW) // XXX bug 3935 +CSS_PROP(-moz-box-flex, box_flex, MozBoxFlex, REFLOW) // XXX bug 3935 +CSS_PROP(-moz-box-flex-group, box_flex_group, MozBoxFlexGroup, REFLOW) // XXX bug 3935 +CSS_PROP(-moz-box-orient, box_orient, MozBoxOrient, REFLOW) // XXX bug 3935 +CSS_PROP(-moz-box-pack, box_pack, MozBoxPack, REFLOW) // XXX bug 3935 +CSS_PROP(-moz-box-sizing, box_sizing, MozBoxSizing, REFLOW) // XXX bug 3935 +CSS_PROP(-moz-box-ordinal-group, box_ordinal_group, MozBoxOrdinalGroup, FRAMECHANGE) +CSS_PROP(caption-side, caption_side, CaptionSide, REFLOW) +CSS_PROP(clear, clear, Clear, REFLOW) +CSS_PROP(clip, clip, Clip, REFLOW) +CSS_PROP_INTERNAL(-x-clip-bottom, clip_bottom, ClipBottom, REFLOW) // XXX bug 3935 +CSS_PROP_INTERNAL(-x-clip-left, clip_left, ClipLeft, REFLOW) // XXX bug 3935 +CSS_PROP_INTERNAL(-x-clip-right, clip_right, ClipRight, REFLOW) // XXX bug 3935 +CSS_PROP_INTERNAL(-x-clip-top, clip_top, ClipTop, REFLOW) // XXX bug 3935 +CSS_PROP(color, color, Color, VISUAL) +CSS_PROP(content, content, Content, FRAMECHANGE) +CSS_PROP(counter-increment, counter_increment, CounterIncrement, REFLOW) +CSS_PROP(counter-reset, counter_reset, CounterReset, REFLOW) +CSS_PROP(-moz-counter-increment, _moz_counter_increment, MozCounterIncrement, REFLOW) // XXX bug 137285 +CSS_PROP(-moz-counter-reset, _moz_counter_reset, MozCounterReset, REFLOW) // XXX bug 137285 +CSS_PROP(cue, cue, Cue, AURAL) +CSS_PROP(cue-after, cue_after, CueAfter, AURAL) +CSS_PROP(cue-before, cue_before, CueBefore, AURAL) +CSS_PROP(cursor, cursor, Cursor, VISUAL) +CSS_PROP(direction, direction, Direction, REFLOW) +CSS_PROP(display, display, Display, FRAMECHANGE) +CSS_PROP(elevation, elevation, Elevation, AURAL) +CSS_PROP(empty-cells, empty_cells, EmptyCells, VISUAL) +CSS_PROP(float, float, CssFloat, FRAMECHANGE) +CSS_PROP(-moz-float-edge, float_edge, MozFloatEdge, REFLOW) // XXX bug 3935 +CSS_PROP(font, font, Font, REFLOW) +CSS_PROP(font-family, font_family, FontFamily, REFLOW) +CSS_PROP(font-size, font_size, FontSize, REFLOW) +CSS_PROP(font-size-adjust, font_size_adjust, FontSizeAdjust, REFLOW) +CSS_PROP(font-stretch, font_stretch, FontStretch, REFLOW) +CSS_PROP(font-style, font_style, FontStyle, REFLOW) +CSS_PROP(font-variant, font_variant, FontVariant, REFLOW) +CSS_PROP(font-weight, font_weight, FontWeight, REFLOW) +CSS_PROP(-moz-force-broken-image-icon, force_broken_image_icon, MozForceBrokenImageIcon, FRAMECHANGE) // bug 58646 +CSS_PROP(height, height, Height, REFLOW) +CSS_PROP(-moz-image-region, image_region, MozImageRegion, REFLOW) +CSS_PROP_INTERNAL(-x-image-region-bottom, image_region_bottom, MozImageRegionBottom, REFLOW) +CSS_PROP_INTERNAL(-x-image-region-left, image_region_left, MozImageRegionLeft, REFLOW) +CSS_PROP_INTERNAL(-x-image-region-right, image_region_right, MozImageRegionRight, REFLOW) +CSS_PROP_INTERNAL(-x-image-region-top, image_region_top, MozImageRegionTop, REFLOW) +CSS_PROP(-moz-key-equivalent, key_equivalent, MozKeyEquivalent, CONTENT) // This will need some other notification, but what? // XXX bug 3935 +CSS_PROP(left, left, Left, REFLOW) +CSS_PROP(letter-spacing, letter_spacing, LetterSpacing, REFLOW) +CSS_PROP(line-height, line_height, LineHeight, REFLOW) +CSS_PROP(list-style, list_style, ListStyle, REFLOW) +CSS_PROP(list-style-image, list_style_image, ListStyleImage, REFLOW) +CSS_PROP(list-style-position, list_style_position, ListStylePosition, REFLOW) +CSS_PROP(list-style-type, list_style_type, ListStyleType, REFLOW) +CSS_PROP(margin, margin, Margin, REFLOW) +CSS_PROP(margin-bottom, margin_bottom, MarginBottom, REFLOW) +CSS_PROP(margin-left, margin_left, MarginLeft, REFLOW) +CSS_PROP(margin-right, margin_right, MarginRight, REFLOW) +CSS_PROP(margin-top, margin_top, MarginTop, REFLOW) +CSS_PROP(marker-offset, marker_offset, MarkerOffset, REFLOW) +CSS_PROP(marks, marks, Marks, VISUAL) +CSS_PROP(max-height, max_height, MaxHeight, REFLOW) +CSS_PROP(max-width, max_width, MaxWidth, REFLOW) +CSS_PROP(min-height, min_height, MinHeight, REFLOW) +CSS_PROP(min-width, min_width, MinWidth, REFLOW) +CSS_PROP(-moz-opacity, opacity, MozOpacity, FRAMECHANGE) // XXX bug 3935 +CSS_PROP(orphans, orphans, Orphans, REFLOW) +CSS_PROP(outline, outline, Outline, VISUAL) +CSS_PROP(outline, outline_color, OutlineColor, VISUAL) +CSS_PROP(outline, outline_style, OutlineStyle, VISUAL) +CSS_PROP(outline, outline_width, OutlineWidth, VISUAL) +CSS_PROP(-moz-outline, _moz_outline, MozOutline, VISUAL) // XXX This is temporary fix for nsbeta3+ Bug 48973, turning outline into -moz-outline XXX bug 48973 +CSS_PROP(-moz-outline-color, _moz_outline_color, MozOutlineColor, VISUAL) // XXX bug 48973 +CSS_PROP(-moz-outline-style, _moz_outline_style, MozOutlineStyle, VISUAL) // XXX bug 48973 +CSS_PROP(-moz-outline-width, _moz_outline_width, MozOutlineWidth, VISUAL) // XXX bug 48973 +CSS_PROP(overflow, overflow, Overflow, FRAMECHANGE) +CSS_PROP(padding, padding, Padding, REFLOW) +CSS_PROP(padding-bottom, padding_bottom, PaddingBottom, REFLOW) +CSS_PROP(padding-left, padding_left, PaddingLeft, REFLOW) +CSS_PROP(padding-right, padding_right, PaddingRight, REFLOW) +CSS_PROP(padding-top, padding_top, PaddingTop, REFLOW) +CSS_PROP(page, page, Page, REFLOW) +CSS_PROP(page-break-after, page_break_after, PageBreakAfter, REFLOW) +CSS_PROP(page-break-before, page_break_before, PageBreakBefore, REFLOW) +CSS_PROP(page-break-inside, page_break_inside, PageBreakInside, REFLOW) +CSS_PROP(pause, pause, Pause, AURAL) +CSS_PROP(pause-after, pause_after, PauseAfter, AURAL) +CSS_PROP(pause-before, pause_before, PauseBefore, AURAL) +CSS_PROP(pitch, pitch, Pitch, AURAL) +CSS_PROP(pitch-range, pitch_range, PitchRange, AURAL) +CSS_PROP(play-during, play_during, PlayDuring, AURAL) +CSS_PROP_INTERNAL(-x-play-during-flags, play_during_flags, PlayDuringFlags, AURAL) // XXX why is this here? +CSS_PROP(position, position, Position, FRAMECHANGE) +CSS_PROP(quotes, quotes, Quotes, REFLOW) +CSS_PROP_INTERNAL(-x-quotes-close, quotes_close, QuotesClose, REFLOW) // XXX bug 3935 +CSS_PROP_INTERNAL(-x-quotes-open, quotes_open, QuotesOpen, REFLOW) // XXX bug 3935 +CSS_PROP(-moz-resizer, resizer, MozResizer, FRAMECHANGE) // XXX bug 3935 +CSS_PROP(richness, richness, Richness, AURAL) +CSS_PROP(right, right, Right, REFLOW) +CSS_PROP(size, size, Size, REFLOW) +CSS_PROP_INTERNAL(-x-size-height, size_height, SizeHeight, REFLOW) // XXX bug 3935 +CSS_PROP_INTERNAL(-x-size-width, size_width, SizeWidth, REFLOW) // XXX bug 3935 +CSS_PROP(speak, speak, Speak, AURAL) +CSS_PROP(speak-header, speak_header, SpeakHeader, AURAL) +CSS_PROP(speak-numeral, speak_numeral, SpeakNumeral, AURAL) +CSS_PROP(speak-punctuation, speak_punctuation, SpeakPunctuation, AURAL) +CSS_PROP(speech-rate, speech_rate, SpeechRate, AURAL) +CSS_PROP(stress, stress, Stress, AURAL) +CSS_PROP(table-layout, table_layout, TableLayout, REFLOW) +CSS_PROP(text-align, text_align, TextAlign, REFLOW) +CSS_PROP(text-decoration, text_decoration, TextDecoration, VISUAL) +CSS_PROP(text-indent, text_indent, TextIndent, REFLOW) +CSS_PROP(text-shadow, text_shadow, TextShadow, VISUAL) +CSS_PROP_INTERNAL(-x-text-shadow-color, text_shadow_color, TextShadowColor, VISUAL) // XXX bug 3935 +CSS_PROP_INTERNAL(-x-text-shadow-radius, text_shadow_radius, TextShadowRadius, VISUAL) // XXX bug 3935 +CSS_PROP_INTERNAL(-x-text-shadow-x, text_shadow_x, TextShadowX, VISUAL) // XXX bug 3935 +CSS_PROP_INTERNAL(-x-text-shadow-y, text_shadow_y, TextShadowY, VISUAL) // XXX bug 3935 +CSS_PROP(text-transform, text_transform, TextTransform, REFLOW) +CSS_PROP(top, top, Top, REFLOW) +CSS_PROP(unicode-bidi, unicode_bidi, UnicodeBidi, REFLOW) +CSS_PROP(-moz-user-focus, user_focus, MozUserFocus, CONTENT) // XXX bug 3935 +CSS_PROP(-moz-user-input, user_input, MozUserInput, FRAMECHANGE) // XXX ??? // XXX bug 3935 +CSS_PROP(-moz-user-modify, user_modify, MozUserModify, FRAMECHANGE) // XXX bug 3935 +CSS_PROP(-moz-user-select, user_select, MozUserSelect, CONTENT) // XXX bug 3935 +CSS_PROP(vertical-align, vertical_align, VerticalAlign, REFLOW) +CSS_PROP(visibility, visibility, Visibility, REFLOW) // reflow for collapse +CSS_PROP(voice-family, voice_family, VoiceFamily, AURAL) +CSS_PROP(volume, volume, Volume, AURAL) +CSS_PROP(white-space, white_space, WhiteSpace, REFLOW) +CSS_PROP(widows, widows, Widows, REFLOW) +CSS_PROP(width, width, Width, REFLOW) +CSS_PROP(word-spacing, word_spacing, WordSpacing, REFLOW) +CSS_PROP(z-index, z_index, ZIndex, REFLOW) #ifdef MOZ_SVG -CSS_PROP(fill, fill, VISUAL) -CSS_PROP(fill-opacity, fill_opacity, VISUAL) -CSS_PROP(fill-rule, fill_rule, VISUAL) -CSS_PROP(stroke, stroke, VISUAL) -CSS_PROP(stroke-dasharray, stroke_dasharray, VISUAL) -CSS_PROP(stroke-dashoffset, stroke_dashoffset, VISUAL) -CSS_PROP(stroke-linecap, stroke_linecap, VISUAL) -CSS_PROP(stroke-linejoin, stroke_linejoin, VISUAL) -CSS_PROP(stroke-miterlimit, stroke_miterlimit, VISUAL) -CSS_PROP(stroke-opacity, stroke_opacity, VISUAL) -CSS_PROP(stroke-width, stroke_width, VISUAL) +// XXX treat SVG's CSS Properties as internal for now. +// Do we want to create an nsIDOMSVGCSS2Properties interface? +CSS_PROP_INTERNAL(fill, fill, Fill, VISUAL) +CSS_PROP_INTERNAL(fill-opacity, fill_opacity, FillOpacity, VISUAL) +CSS_PROP_INTERNAL(fill-rule, fill_rule, FillRule, VISUAL) +CSS_PROP_INTERNAL(stroke, stroke, Stroke, VISUAL) +CSS_PROP_INTERNAL(stroke-dasharray, stroke_dasharray, StrokeDasharray, VISUAL) +CSS_PROP_INTERNAL(stroke-dashoffset, stroke_dashoffset, StrokeDashoffset, VISUAL) +CSS_PROP_INTERNAL(stroke-linecap, stroke_linecap, StrokeLinecap, VISUAL) +CSS_PROP_INTERNAL(stroke-linejoin, stroke_linejoin, StrokeLinejoin, VISUAL) +CSS_PROP_INTERNAL(stroke-miterlimit, stroke_miterlimit, StrokeMiterlimit, VISUAL) +CSS_PROP_INTERNAL(stroke-opacity, stroke_opacity, StrokeOpacity, VISUAL) +CSS_PROP_INTERNAL(stroke-width, stroke_width, StrokeWidth, VISUAL) +#endif + +// Clean up after ourselves +#ifdef DEFINED_CSS_PROP_INTERNAL +#undef CSS_PROP_INTERNAL +#undef DEFINED_CSS_PROP_INTERNAL +#endif + +#ifdef DEFINED_CSS_PROP_NOTIMPLEMENTED +#undef CSS_PROP_NOTIMPLEMENTED +#undef DEFINED_CSS_PROP_NOTIMPLEMENTED #endif - diff --git a/mozilla/layout/style/nsCSSProps.cpp b/mozilla/layout/style/nsCSSProps.cpp index e70c86bc60f..9bc1ef931b6 100644 --- a/mozilla/layout/style/nsCSSProps.cpp +++ b/mozilla/layout/style/nsCSSProps.cpp @@ -48,7 +48,7 @@ #include "nsStaticNameTable.h" // define an array of all CSS properties -#define CSS_PROP(_name, _id, _hint) #_name, +#define CSS_PROP(_name, _id, _method, _hint) #_name, const char* kCSSRawProperties[] = { #include "nsCSSPropList.h" }; @@ -1018,8 +1018,8 @@ static const PRInt32 kBackgroundYPositionKTable[] = { case eCSSProperty_content: return SearchKeywordTable(aValue, kContentKTable); - case eCSSProperty_counter_increment: - case eCSSProperty_counter_reset: + case eCSSProperty__moz_counter_increment: + case eCSSProperty__moz_counter_reset: case eCSSProperty_cue: case eCSSProperty_cue_after: case eCSSProperty_cue_before: @@ -1113,16 +1113,16 @@ static const PRInt32 kBackgroundYPositionKTable[] = { case eCSSProperty_opacity: case eCSSProperty_orphans: - case eCSSProperty_outline: + case eCSSProperty__moz_outline: break; - case eCSSProperty_outline_color: + case eCSSProperty__moz_outline_color: return SearchKeywordTable(aValue, kOutlineColorKTable); - case eCSSProperty_outline_style: + case eCSSProperty__moz_outline_style: return SearchKeywordTable(aValue, kBorderStyleKTable); - case eCSSProperty_outline_width: + case eCSSProperty__moz_outline_width: return SearchKeywordTable(aValue, kBorderWidthKTable); case eCSSProperty_overflow: @@ -1286,7 +1286,7 @@ PRBool nsCSSProps::GetColorName(PRInt32 aPropValue, nsCString &aStr) } // define array of all CSS property hints -#define CSS_PROP(_name, _id, _hint) NS_STYLE_HINT_##_hint, +#define CSS_PROP(_name, _id, _method, _hint) NS_STYLE_HINT_##_hint, const nsChangeHint nsCSSProps::kHintTable[eCSSProperty_COUNT] = { #include "nsCSSPropList.h" }; diff --git a/mozilla/layout/style/nsCSSProps.h b/mozilla/layout/style/nsCSSProps.h index 1d0f519cc2f..8b203e993fd 100644 --- a/mozilla/layout/style/nsCSSProps.h +++ b/mozilla/layout/style/nsCSSProps.h @@ -48,7 +48,7 @@ To change the list of properties, see nsCSSPropList.h */ -#define CSS_PROP(_name, _id, _hint) eCSSProperty_##_id, +#define CSS_PROP(_name, _id, _method, _hint) eCSSProperty_##_id, enum nsCSSProperty { eCSSProperty_UNKNOWN = -1, #include "nsCSSPropList.h" diff --git a/mozilla/layout/style/nsCSSStruct.cpp b/mozilla/layout/style/nsCSSStruct.cpp index d38ee70f5a4..02269ec745a 100644 --- a/mozilla/layout/style/nsCSSStruct.cpp +++ b/mozilla/layout/style/nsCSSStruct.cpp @@ -550,9 +550,9 @@ void nsCSSMargin::List(FILE* out, PRInt32 aIndent) const for (PRInt32 index = aIndent; --index >= 0; ) fputs(" ", out); nsAutoString buffer; - mOutlineWidth.AppendToString(buffer, eCSSProperty_outline_width); - mOutlineColor.AppendToString(buffer, eCSSProperty_outline_color); - mOutlineStyle.AppendToString(buffer, eCSSProperty_outline_style); + mOutlineWidth.AppendToString(buffer, eCSSProperty__moz_outline_width); + mOutlineColor.AppendToString(buffer, eCSSProperty__moz_outline_color); + mOutlineStyle.AppendToString(buffer, eCSSProperty__moz_outline_style); if (nsnull != mOutlineRadius) { static const nsCSSProperty trbl[] = { eCSSProperty__moz_outline_radius_topLeft, @@ -912,13 +912,13 @@ void nsCSSContent::List(FILE* out, PRInt32 aIndent) const } nsCSSCounterData* counter = mCounterIncrement; while (nsnull != counter) { - counter->mCounter.AppendToString(buffer, eCSSProperty_counter_increment); + counter->mCounter.AppendToString(buffer, eCSSProperty__moz_counter_increment); counter->mValue.AppendToString(buffer, eCSSProperty_UNKNOWN); counter = counter->mNext; } counter = mCounterReset; while (nsnull != counter) { - counter->mCounter.AppendToString(buffer, eCSSProperty_counter_reset); + counter->mCounter.AppendToString(buffer, eCSSProperty__moz_counter_reset); counter->mValue.AppendToString(buffer, eCSSProperty_UNKNOWN); counter = counter->mNext; } @@ -1711,15 +1711,15 @@ nsCSSDeclaration::AppendValue(nsCSSProperty aProperty, const nsCSSValue& aValue) break; } - case eCSSProperty_outline_width: - case eCSSProperty_outline_color: - case eCSSProperty_outline_style: + case eCSSProperty__moz_outline_width: + case eCSSProperty__moz_outline_color: + case eCSSProperty__moz_outline_style: case eCSSProperty_float_edge: { CSS_ENSURE(Margin) { switch (aProperty) { - case eCSSProperty_outline_width: theMargin->mOutlineWidth = aValue; break; - case eCSSProperty_outline_color: theMargin->mOutlineColor = aValue; break; - case eCSSProperty_outline_style: theMargin->mOutlineStyle = aValue; break; + case eCSSProperty__moz_outline_width: theMargin->mOutlineWidth = aValue; break; + case eCSSProperty__moz_outline_color: theMargin->mOutlineColor = aValue; break; + case eCSSProperty__moz_outline_style: theMargin->mOutlineStyle = aValue; break; case eCSSProperty_float_edge: theMargin->mFloatEdge = aValue; break; CSS_BOGUS_DEFAULT; // make compiler happy } @@ -1870,8 +1870,8 @@ nsCSSDeclaration::AppendValue(nsCSSProperty aProperty, const nsCSSValue& aValue) // nsCSSContent case eCSSProperty_content: - case eCSSProperty_counter_increment: - case eCSSProperty_counter_reset: + case eCSSProperty__moz_counter_increment: + case eCSSProperty__moz_counter_reset: case eCSSProperty_marker_offset: case eCSSProperty_quotes_open: case eCSSProperty_quotes_close: { @@ -1883,13 +1883,13 @@ nsCSSDeclaration::AppendValue(nsCSSProperty aProperty, const nsCSSValue& aValue) CSS_IF_DELETE(theContent->mContent->mNext); } break; - case eCSSProperty_counter_increment: + case eCSSProperty__moz_counter_increment: CSS_ENSURE_DATA(theContent->mCounterIncrement, nsCSSCounterData) { theContent->mCounterIncrement->mCounter = aValue; CSS_IF_DELETE(theContent->mCounterIncrement->mNext); } break; - case eCSSProperty_counter_reset: + case eCSSProperty__moz_counter_reset: CSS_ENSURE_DATA(theContent->mCounterReset, nsCSSCounterData) { theContent->mCounterReset->mCounter = aValue; CSS_IF_DELETE(theContent->mCounterReset->mNext); @@ -2066,7 +2066,7 @@ nsCSSDeclaration::AppendValue(nsCSSProperty aProperty, const nsCSSValue& aValue) case eCSSProperty_image_region: case eCSSProperty_list_style: case eCSSProperty_margin: - case eCSSProperty_outline: + case eCSSProperty__moz_outline: case eCSSProperty_padding: case eCSSProperty_pause: case eCSSProperty_quotes: @@ -2138,7 +2138,7 @@ nsCSSDeclaration::AppendStructValue(nsCSSProperty aProperty, void* aStruct) break; } - case eCSSProperty_counter_increment: { + case eCSSProperty__moz_counter_increment: { CSS_ENSURE(Content) { CSS_IF_DELETE(theContent->mCounterIncrement); theContent->mCounterIncrement = (nsCSSCounterData*)aStruct; @@ -2146,7 +2146,7 @@ nsCSSDeclaration::AppendStructValue(nsCSSProperty aProperty, void* aStruct) break; } - case eCSSProperty_counter_reset: { + case eCSSProperty__moz_counter_reset: { CSS_ENSURE(Content) { CSS_IF_DELETE(theContent->mCounterReset); theContent->mCounterReset = (nsCSSCounterData*)aStruct; @@ -2644,17 +2644,17 @@ nsCSSDeclaration::SetValueImportant(nsCSSProperty aProperty) break; } - case eCSSProperty_outline_width: - case eCSSProperty_outline_color: - case eCSSProperty_outline_style: + case eCSSProperty__moz_outline_width: + case eCSSProperty__moz_outline_color: + case eCSSProperty__moz_outline_style: case eCSSProperty_float_edge: { CSS_VARONSTACK_GET(Margin); if (nsnull != theMargin) { CSS_ENSURE_IMPORTANT(Margin) { switch (aProperty) { - CSS_CASE_IMPORTANT(eCSSProperty_outline_width, Margin, mOutlineWidth); - CSS_CASE_IMPORTANT(eCSSProperty_outline_color, Margin, mOutlineColor); - CSS_CASE_IMPORTANT(eCSSProperty_outline_style, Margin, mOutlineStyle); + CSS_CASE_IMPORTANT(eCSSProperty__moz_outline_width, Margin, mOutlineWidth); + CSS_CASE_IMPORTANT(eCSSProperty__moz_outline_color, Margin, mOutlineColor); + CSS_CASE_IMPORTANT(eCSSProperty__moz_outline_style, Margin, mOutlineStyle); CSS_CASE_IMPORTANT(eCSSProperty_float_edge, Margin, mFloatEdge); CSS_BOGUS_DEFAULT; // make compiler happy } @@ -2846,7 +2846,7 @@ nsCSSDeclaration::SetValueImportant(nsCSSProperty aProperty) break; } - case eCSSProperty_counter_increment: { + case eCSSProperty__moz_counter_increment: { CSS_VARONSTACK_GET(Content); if (nsnull != theContent) { if (nsnull != theContent->mCounterIncrement) { @@ -2860,7 +2860,7 @@ nsCSSDeclaration::SetValueImportant(nsCSSProperty aProperty) break; } - case eCSSProperty_counter_reset: { + case eCSSProperty__moz_counter_reset: { CSS_VARONSTACK_GET(Content); if (nsnull != theContent) { if (nsnull != theContent->mCounterReset) { @@ -3134,10 +3134,10 @@ nsCSSDeclaration::SetValueImportant(nsCSSProperty aProperty) SetValueImportant(eCSSProperty_margin_bottom); SetValueImportant(eCSSProperty_margin_left); break; - case eCSSProperty_outline: - SetValueImportant(eCSSProperty_outline_color); - SetValueImportant(eCSSProperty_outline_style); - SetValueImportant(eCSSProperty_outline_width); + case eCSSProperty__moz_outline: + SetValueImportant(eCSSProperty__moz_outline_color); + SetValueImportant(eCSSProperty__moz_outline_style); + SetValueImportant(eCSSProperty__moz_outline_width); break; case eCSSProperty_padding: SetValueImportant(eCSSProperty_padding_top); @@ -3530,15 +3530,15 @@ nsCSSDeclaration::RemoveProperty(nsCSSProperty aProperty) break; } - case eCSSProperty_outline_width: - case eCSSProperty_outline_color: - case eCSSProperty_outline_style: + case eCSSProperty__moz_outline_width: + case eCSSProperty__moz_outline_color: + case eCSSProperty__moz_outline_style: case eCSSProperty_float_edge: { CSS_CHECK(Margin) { switch (aProperty) { - case eCSSProperty_outline_width: theMargin->mOutlineWidth.Reset(); break; - case eCSSProperty_outline_color: theMargin->mOutlineColor.Reset(); break; - case eCSSProperty_outline_style: theMargin->mOutlineStyle.Reset(); break; + case eCSSProperty__moz_outline_width: theMargin->mOutlineWidth.Reset(); break; + case eCSSProperty__moz_outline_color: theMargin->mOutlineColor.Reset(); break; + case eCSSProperty__moz_outline_style: theMargin->mOutlineStyle.Reset(); break; case eCSSProperty_float_edge: theMargin->mFloatEdge.Reset(); break; CSS_BOGUS_DEFAULT; // make compiler happy } @@ -3688,8 +3688,8 @@ nsCSSDeclaration::RemoveProperty(nsCSSProperty aProperty) // nsCSSContent case eCSSProperty_content: - case eCSSProperty_counter_increment: - case eCSSProperty_counter_reset: + case eCSSProperty__moz_counter_increment: + case eCSSProperty__moz_counter_reset: case eCSSProperty_marker_offset: case eCSSProperty_quotes_open: case eCSSProperty_quotes_close: { @@ -3701,13 +3701,13 @@ nsCSSDeclaration::RemoveProperty(nsCSSProperty aProperty) CSS_IF_DELETE(theContent->mContent->mNext); } break; - case eCSSProperty_counter_increment: + case eCSSProperty__moz_counter_increment: CSS_CHECK_DATA(theContent->mCounterIncrement, nsCSSCounterData) { theContent->mCounterIncrement->mCounter.Reset(); CSS_IF_DELETE(theContent->mCounterIncrement->mNext); } break; - case eCSSProperty_counter_reset: + case eCSSProperty__moz_counter_reset: CSS_CHECK_DATA(theContent->mCounterReset, nsCSSCounterData) { theContent->mCounterReset->mCounter.Reset(); CSS_IF_DELETE(theContent->mCounterReset->mNext); @@ -3925,10 +3925,10 @@ nsCSSDeclaration::RemoveProperty(nsCSSProperty aProperty) } break; } - case eCSSProperty_outline: - RemoveProperty(eCSSProperty_outline_color); - RemoveProperty(eCSSProperty_outline_style); - RemoveProperty(eCSSProperty_outline_width); + case eCSSProperty__moz_outline: + RemoveProperty(eCSSProperty__moz_outline_color); + RemoveProperty(eCSSProperty__moz_outline_style); + RemoveProperty(eCSSProperty__moz_outline_width); break; case eCSSProperty_padding: { CSS_CHECK(Margin) { @@ -4366,16 +4366,16 @@ nsCSSDeclaration::GetValue(nsCSSProperty aProperty, nsCSSValue& aValue) break; } - case eCSSProperty_outline_width: - case eCSSProperty_outline_color: - case eCSSProperty_outline_style: + case eCSSProperty__moz_outline_width: + case eCSSProperty__moz_outline_color: + case eCSSProperty__moz_outline_style: case eCSSProperty_float_edge: { CSS_VARONSTACK_GET(Margin); if (nsnull != theMargin) { switch (aProperty) { - case eCSSProperty_outline_width: aValue = theMargin->mOutlineWidth; break; - case eCSSProperty_outline_color: aValue = theMargin->mOutlineColor; break; - case eCSSProperty_outline_style: aValue = theMargin->mOutlineStyle; break; + case eCSSProperty__moz_outline_width: aValue = theMargin->mOutlineWidth; break; + case eCSSProperty__moz_outline_color: aValue = theMargin->mOutlineColor; break; + case eCSSProperty__moz_outline_style: aValue = theMargin->mOutlineStyle; break; case eCSSProperty_float_edge: aValue = theMargin->mFloatEdge; break; CSS_BOGUS_DEFAULT; // make compiler happy } @@ -4557,8 +4557,8 @@ nsCSSDeclaration::GetValue(nsCSSProperty aProperty, nsCSSValue& aValue) // nsCSSContent case eCSSProperty_content: - case eCSSProperty_counter_increment: - case eCSSProperty_counter_reset: + case eCSSProperty__moz_counter_increment: + case eCSSProperty__moz_counter_reset: case eCSSProperty_marker_offset: case eCSSProperty_quotes_open: case eCSSProperty_quotes_close: { @@ -4570,12 +4570,12 @@ nsCSSDeclaration::GetValue(nsCSSProperty aProperty, nsCSSValue& aValue) aValue = theContent->mContent->mValue; } break; - case eCSSProperty_counter_increment: + case eCSSProperty__moz_counter_increment: if (nsnull != theContent->mCounterIncrement) { aValue = theContent->mCounterIncrement->mCounter; } break; - case eCSSProperty_counter_reset: + case eCSSProperty__moz_counter_reset: if (nsnull != theContent->mCounterReset) { aValue = theContent->mCounterReset->mCounter; } @@ -4766,7 +4766,7 @@ nsCSSDeclaration::GetValue(nsCSSProperty aProperty, nsCSSValue& aValue) case eCSSProperty_image_region: case eCSSProperty_list_style: case eCSSProperty_margin: - case eCSSProperty_outline: + case eCSSProperty__moz_outline: case eCSSProperty_padding: case eCSSProperty_pause: case eCSSProperty_quotes: @@ -5131,10 +5131,10 @@ nsCSSDeclaration::GetValue(nsCSSProperty aProperty, } break; } - case eCSSProperty_outline: - if (AppendValueToString(eCSSProperty_outline_color, aValue)) aValue.Append(PRUnichar(' ')); - if (AppendValueToString(eCSSProperty_outline_style, aValue)) aValue.Append(PRUnichar(' ')); - AppendValueToString(eCSSProperty_outline_width, aValue); + case eCSSProperty__moz_outline: + if (AppendValueToString(eCSSProperty__moz_outline_color, aValue)) aValue.Append(PRUnichar(' ')); + if (AppendValueToString(eCSSProperty__moz_outline_style, aValue)) aValue.Append(PRUnichar(' ')); + AppendValueToString(eCSSProperty__moz_outline_width, aValue); break; case eCSSProperty_padding: { CSS_VARONSTACK_GET(Margin); @@ -5279,15 +5279,15 @@ nsCSSDeclaration::GetValue(nsCSSProperty aProperty, } break; } - case eCSSProperty_counter_increment: { + case eCSSProperty__moz_counter_increment: { CSS_VARONSTACK_GET(Content); if ((nsnull != theContent) && (nsnull != theContent->mCounterIncrement)) { nsCSSCounterData* data = theContent->mCounterIncrement; do { - if (AppendValueToString(eCSSProperty_counter_increment, data->mCounter, aValue)) { + if (AppendValueToString(eCSSProperty__moz_counter_increment, data->mCounter, aValue)) { if (HAS_VALUE(data, mValue)) { aValue.Append(PRUnichar(' ')); - AppendValueToString(eCSSProperty_counter_increment, data->mValue, aValue); + AppendValueToString(eCSSProperty__moz_counter_increment, data->mValue, aValue); } } data = data->mNext; @@ -5298,15 +5298,15 @@ nsCSSDeclaration::GetValue(nsCSSProperty aProperty, } break; } - case eCSSProperty_counter_reset: { + case eCSSProperty__moz_counter_reset: { CSS_VARONSTACK_GET(Content); if ((nsnull != theContent) && (nsnull != theContent->mCounterReset)) { nsCSSCounterData* data = theContent->mCounterReset; do { - if (AppendValueToString(eCSSProperty_counter_reset, data->mCounter, aValue)) { + if (AppendValueToString(eCSSProperty__moz_counter_reset, data->mCounter, aValue)) { if (HAS_VALUE(data, mValue)) { aValue.Append(PRUnichar(' ')); - AppendValueToString(eCSSProperty_counter_reset, data->mValue, aValue); + AppendValueToString(eCSSProperty__moz_counter_reset, data->mValue, aValue); } } data = data->mNext; diff --git a/mozilla/layout/style/nsComputedDOMStyle.cpp b/mozilla/layout/style/nsComputedDOMStyle.cpp index 145b9c45c5a..5031600f6bf 100644 --- a/mozilla/layout/style/nsComputedDOMStyle.cpp +++ b/mozilla/layout/style/nsComputedDOMStyle.cpp @@ -253,10 +253,10 @@ static const nsCSSProperty queryableProperties[] = { eCSSProperty_float_edge, eCSSProperty_opacity, - //// eCSSProperty_outline, - eCSSProperty_outline_color, - eCSSProperty_outline_style, - eCSSProperty_outline_width, + //// eCSSProperty__moz_outline, + eCSSProperty__moz_outline_color, + eCSSProperty__moz_outline_style, + eCSSProperty__moz_outline_width, eCSSProperty_user_focus, eCSSProperty_user_input, @@ -319,6 +319,8 @@ nsComputedDOMStyle::Shutdown() NS_INTERFACE_MAP_BEGIN(nsComputedDOMStyle) NS_INTERFACE_MAP_ENTRY(nsIComputedDOMStyle) NS_INTERFACE_MAP_ENTRY(nsIDOMCSSStyleDeclaration) + NS_INTERFACE_MAP_ENTRY(nsIDOMCSS2Properties) + NS_INTERFACE_MAP_ENTRY(nsIDOMNSCSS2Properties) NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIComputedDOMStyle) NS_INTERFACE_MAP_ENTRY_CONTENT_CLASSINFO(ComputedCSSStyleDeclaration) NS_INTERFACE_MAP_END @@ -611,11 +613,11 @@ nsComputedDOMStyle::GetPropertyCSSValue(const nsAString& aPropertyName, rv = GetMarkerOffset(frame, aReturn); break; // Outline properties - case eCSSProperty_outline_width : + case eCSSProperty__moz_outline_width : rv = GetOutlineWidth(frame, aReturn); break; - case eCSSProperty_outline_style : + case eCSSProperty__moz_outline_style : rv = GetOutlineStyle(frame, aReturn); break; - case eCSSProperty_outline_color: + case eCSSProperty__moz_outline_color: rv = GetOutlineColor(frame, aReturn); break; // Text properties @@ -742,52 +744,6 @@ nsComputedDOMStyle::Item(PRUint32 aIndex, nsAString& aReturn) // Property getters... -#if 0 - -NS_IMETHODIMP -nsComputedDOMStyle::GetAzimuth(nsAString& aAzimuth) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetBackground(nsAString& aBackground) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetBackgroundAttachment(nsAString& aBackgroundAttachment) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetBackgroundColor(nsAString& aBackgroundColor) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetBackgroundImage(nsAString& aBackgroundImage) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetBackgroundPosition(nsAString& aBackgroundPosition) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetBackgroundRepeat(nsAString& aBackgroundRepeat) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -#endif - nsresult nsComputedDOMStyle::GetBinding(nsIFrame *aFrame, nsIDOMCSSValue** aValue) @@ -852,141 +808,6 @@ nsComputedDOMStyle::GetCssFloat(nsIFrame *aFrame, return CallQueryInterface(val, aValue); } -#if 0 - -NS_IMETHODIMP -nsComputedDOMStyle::GetBorder(nsAString& aBorder) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetBorderCollapse(nsAString& aBorderCollapse) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetBorderColor(nsAString& aBorderColor) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetBorderSpacing(nsAString& aBorderSpacing) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetBorderStyle(nsAString& aBorderStyle) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetBorderTop(nsAString& aBorderTop) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetBorderRight(nsAString& aBorderRight) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetBorderBottom(nsAString& aBorderBottom) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetBorderLeft(nsAString& aBorderLeft) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetBorderTopColor(nsAString& aBorderTopColor) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetBorderRightColor(nsAString& aBorderRightColor) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetBorderBottomColor(nsAString& aBorderBottomColor) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetBorderLeftColor(nsAString& aBorderLeftColor) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetBorderTopStyle(nsAString& aBorderTopStyle) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetBorderRightStyle(nsAString& aBorderRightStyle) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetBorderBottomStyle(nsAString& aBorderBottomStyle) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetBorderLeftStyle(nsAString& aBorderLeftStyle) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetBorderTopWidth(nsAString& aBorderTopWidth) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetBorderRightWidth(nsAString& aBorderRightWidth) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetBorderBottomWidth(nsAString& aBorderBottomWidth) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetBorderLeftWidth(nsAString& aBorderLeftWidth) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetBorderWidth(nsAString& aBorderWidth) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} -#endif - nsresult nsComputedDOMStyle::GetBottom(nsIFrame *aFrame, nsIDOMCSSValue** aValue) @@ -1712,7 +1533,7 @@ nsComputedDOMStyle::GetOutlineWidth(nsIFrame *aFrame, case eStyleUnit_Chars: { const nsAFlatCString& width = - nsCSSProps::LookupPropertyValue(eCSSProperty_outline_width, + nsCSSProps::LookupPropertyValue(eCSSProperty__moz_outline_width, outline->mOutlineWidth.GetIntValue()); val->SetIdent(width); break; @@ -2618,86 +2439,6 @@ nsComputedDOMStyle::GetUserSelect(nsIFrame *aFrame, return CallQueryInterface(val, aValue); } -#if 0 -NS_IMETHODIMP -nsComputedDOMStyle::GetCaptionSide(nsAString& aCaptionSide) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetClear(nsAString& aClear) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetClip(nsAString& aClip) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetColor(nsAString& aColor) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetContent(nsAString& aContent) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetCounterIncrement(nsAString& aCounterIncrement) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetCounterReset(nsAString& aCounterReset) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetCssFloat(nsAString& aFloat) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetCue(nsAString& aCue) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetCueAfter(nsAString& aCueAfter) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetCueBefore(nsAString& aCueBefore) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetCursor(nsAString& aCursor) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetDirection(nsAString& aDirection) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} -#endif - nsresult nsComputedDOMStyle::GetDisplay(nsIFrame *aFrame, nsIDOMCSSValue** aValue) @@ -2861,69 +2602,6 @@ nsComputedDOMStyle::GetOverflow(nsIFrame *aFrame, return CallQueryInterface(val, aValue); } -#if 0 -NS_IMETHODIMP -nsComputedDOMStyle::GetElevation(nsAString& aElevation) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetEmptyCells(nsAString& aEmptyCells) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetFont(nsAString& aFont) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetFontFamily(nsAString& aFontFamily) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetFontSize(nsAString& aFontSize) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetFontSizeAdjust(nsAString& aFontSizeAdjust) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetFontStretch(nsAString& aFontStretch) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetFontStyle(nsAString& aFontStyle) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetFontVariant(nsAString& aFontVariant) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetFontWeight(nsAString& aFontWeight) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -#endif - nsresult nsComputedDOMStyle::GetHeight(nsIFrame *aFrame, nsIDOMCSSValue** aValue) @@ -3340,390 +3018,18 @@ nsComputedDOMStyle::GetLeft(nsIFrame *aFrame, nsIDOMCSSValue** aValue) return GetOffsetWidthFor(NS_SIDE_LEFT, aFrame, aValue); } -#if 0 -NS_IMETHODIMP -nsComputedDOMStyle::GetLetterSpacing(nsAString& aLetterSpacing) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetLineHeight(nsAString& aLineHeight) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetListStyle(nsAString& aListStyle) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetListStyleImage(nsAString& aListStyleImage) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetListStylePosition(nsAString& aListStylePosition) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetListStyleType(nsAString& aListStyleType) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetMargin(nsAString& aMargin) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetMarginTop(nsIFrame *aFrame, nsIDOMCSSValue** aValue) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetMarginRight(nsIFrame *aFrame, nsIDOMCSSValue** aValue) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetMarginBottom(nsIFrame *aFrame, nsIDOMCSSValue** aValue) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetMarginLeft(nsIFrame *aFrame, nsIDOMCSSValue** aValue) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetMarkerOffset(nsAString& aMarkerOffset) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetMarks(nsAString& aMarks) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetMaxHeight(nsAString& aMaxHeight) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetMaxWidth(nsAString& aMaxWidth) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetMinHeight(nsAString& aMinHeight) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetMinWidth(nsAString& aMinWidth) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetOrphans(nsAString& aOrphans) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetOutline(nsAString& aOutline) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetOutlineColor(nsAString& aOutlineColor) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetOutlineStyle(nsAString& aOutlineStyle) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetOutlineWidth(nsAString& aOutlineWidth) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetOverflow(nsAString& aOverflow) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetPadding(nsAString& aPadding) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetPaddingTop(nsAString& aPaddingTop) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetPaddingRight(nsAString& aPaddingRight) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetPaddingBottom(nsAString& aPaddingBottom) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetPaddingLeft(nsAString& aPaddingLeft) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetPage(nsAString& aPage) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetPageBreakAfter(nsAString& aPageBreakAfter) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetPageBreakBefore(nsAString& aPageBreakBefore) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetPageBreakInside(nsAString& aPageBreakInside) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetPause(nsAString& aPause) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetPauseAfter(nsAString& aPauseAfter) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetPauseBefore(nsAString& aPauseBefore) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetPitch(nsAString& aPitch) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetPitchRange(nsAString& aPitchRange) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetPlayDuring(nsAString& aPlayDuring) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetPosition(nsAString& aPosition) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetQuotes(nsAString& aQuotes) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetRichness(nsAString& aRichness) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} -#endif - nsresult nsComputedDOMStyle::GetRight(nsIFrame *aFrame, nsIDOMCSSValue** aValue) { return GetOffsetWidthFor(NS_SIDE_RIGHT, aFrame, aValue); } -#if 0 -NS_IMETHODIMP -nsComputedDOMStyle::GetSize(nsAString& aSize) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetSpeak(nsAString& aSpeak) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetSpeakHeader(nsAString& aSpeakHeader) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetSpeakNumeral(nsAString& aSpeakNumeral) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetSpeakPunctuation(nsAString& aSpeakPunctuation) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetSpeechRate(nsAString& aSpeechRate) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetStress(nsAString& aStress) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetTableLayout(nsAString& aTableLayout) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetTextAlign(nsAString& aTextAlign) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetTextDecoration(nsAString& aTextDecoration) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetTextIndent(nsAString& aTextIndent) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetTextShadow(nsAString& aTextShadow) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetTextTransform(nsAString& aTextTransform) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} -#endif - nsresult nsComputedDOMStyle::GetTop(nsIFrame *aFrame, nsIDOMCSSValue** aValue) { return GetOffsetWidthFor(NS_SIDE_TOP, aFrame, aValue); } -#if 0 -NS_IMETHODIMP -nsComputedDOMStyle::GetUnicodeBidi(nsAString& aUnicodeBidi) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetVerticalAlign(nsAString& aVerticalAlign) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetVisibility(nsAString& aVisibility) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetVoiceFamily(nsAString& aVoiceFamily) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetVolume(nsAString& aVolume) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetWhiteSpace(nsAString& aWhiteSpace) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} - -NS_IMETHODIMP -nsComputedDOMStyle::GetWidows(nsAString& aWidows) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} -#endif - nsROCSSPrimitiveValue* nsComputedDOMStyle::GetROCSSPrimitiveValue() { @@ -4487,24 +3793,26 @@ nsComputedDOMStyle::GetBorderStyleFor(PRUint8 aSide, nsIFrame *aFrame, return CallQueryInterface(val, aValue); } -#if 0 +// nsIDOMCSS2Properties -NS_IMETHODIMP -nsComputedDOMStyle::GetWordSpacing(nsAString& aWordSpacing) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} +#define CSS_PROP(name_, id_, method_, hint_) \ + NS_IMETHODIMP \ + nsComputedDOMStyle::Get##method_(nsAString& aValue) \ + { \ + return GetPropertyValue(NS_LITERAL_STRING(#name_), aValue); \ + } \ + \ + NS_IMETHODIMP \ + nsComputedDOMStyle::Set##method_(const nsAString& aValue) \ + { \ + return NS_ERROR_DOM_NO_MODIFICATION_ALLOWED_ERR; \ + } -NS_IMETHODIMP -nsComputedDOMStyle::GetZIndex(nsAString& aZIndex) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} +#define CSS_PROP_INTERNAL(name_, id_, method_, hint_) /* nothing */ +#define CSS_PROP_NOTIMPLEMENTED(name_, id_, method_, hint_) \ + CSS_PROP(name_, id_, method_, hint_) -NS_IMETHODIMP -nsComputedDOMStyle::GetOpacity(nsAString& aOpacity) -{ - return NS_ERROR_DOM_NOT_SUPPORTED_ERR; -} +#include "nsCSSPropList.h" -#endif +#undef CSS_PROP_INTERNAL +#undef CSS_PROP diff --git a/mozilla/layout/style/nsComputedDOMStyle.h b/mozilla/layout/style/nsComputedDOMStyle.h index 0df28d0df06..2e607f2c0d3 100644 --- a/mozilla/layout/style/nsComputedDOMStyle.h +++ b/mozilla/layout/style/nsComputedDOMStyle.h @@ -41,6 +41,7 @@ #define nsComputedDOMStyle_h__ #include "nsIComputedDOMStyle.h" +#include "nsIDOMCSS2Properties.h" #include "nsROCSSPrimitiveValue.h" #include "nsDOMCSSRGBColor.h" @@ -52,7 +53,8 @@ #include "nsCOMPtr.h" #include "nsWeakReference.h" -class nsComputedDOMStyle : public nsIComputedDOMStyle +class nsComputedDOMStyle : public nsIComputedDOMStyle, + public nsIDOMNSCSS2Properties { public: NS_DECL_ISUPPORTS @@ -61,6 +63,9 @@ public: const nsAString& aPseudoElt, nsIPresShell *aPresShell); + NS_DECL_NSIDOMCSS2PROPERTIES + NS_DECL_NSIDOMNSCSS2PROPERTIES + NS_DECL_NSIDOMCSSSTYLEDECLARATION nsComputedDOMStyle(); diff --git a/mozilla/layout/style/nsDOMCSSDeclaration.cpp b/mozilla/layout/style/nsDOMCSSDeclaration.cpp index 83d93ddccc9..8efa0d5a4ed 100644 --- a/mozilla/layout/style/nsDOMCSSDeclaration.cpp +++ b/mozilla/layout/style/nsDOMCSSDeclaration.cpp @@ -232,172 +232,27 @@ CallSetProperty(nsDOMCSSDeclaration* aDecl, return aDecl->ParsePropertyValue(aPropName, aValue); } -#define IMPL_CSSPROP(attname_, propname_) \ + +// nsIDOMCSS2Properties + +#define CSS_PROP(name_, id_, method_, hint_) \ NS_IMETHODIMP \ - nsDOMCSSDeclaration::Get##attname_(nsAString& aValue) \ + nsDOMCSSDeclaration::Get##method_(nsAString& aValue) \ { \ - return GetPropertyValue(propname_, aValue); \ + return GetPropertyValue(NS_LITERAL_STRING(#name_), aValue); \ } \ \ NS_IMETHODIMP \ - nsDOMCSSDeclaration::Set##attname_(const nsAString& aValue) \ + nsDOMCSSDeclaration::Set##method_(const nsAString& aValue) \ { \ - return CallSetProperty(this, propname_, aValue); \ + return CallSetProperty(this, NS_LITERAL_STRING(#name_), aValue); \ } - // nsIDOMCSS2Properties -IMPL_CSSPROP(Azimuth, NS_LITERAL_STRING("azimuth")) -IMPL_CSSPROP(Background, NS_LITERAL_STRING("background")) -IMPL_CSSPROP(BackgroundAttachment, NS_LITERAL_STRING("background-attachment")) -IMPL_CSSPROP(BackgroundColor, NS_LITERAL_STRING("background-color")) -IMPL_CSSPROP(BackgroundImage, NS_LITERAL_STRING("background-image")) -IMPL_CSSPROP(BackgroundPosition, NS_LITERAL_STRING("background-position")) -IMPL_CSSPROP(BackgroundRepeat, NS_LITERAL_STRING("background-repeat")) -IMPL_CSSPROP(Border, NS_LITERAL_STRING("border")) -IMPL_CSSPROP(BorderCollapse, NS_LITERAL_STRING("border-collapse")) -IMPL_CSSPROP(BorderColor, NS_LITERAL_STRING("border-color")) -IMPL_CSSPROP(BorderSpacing, NS_LITERAL_STRING("border-spacing")) -IMPL_CSSPROP(BorderStyle, NS_LITERAL_STRING("border-style")) -IMPL_CSSPROP(BorderTop, NS_LITERAL_STRING("border-top")) -IMPL_CSSPROP(BorderRight, NS_LITERAL_STRING("border-right")) -IMPL_CSSPROP(BorderBottom, NS_LITERAL_STRING("border-bottom")) -IMPL_CSSPROP(BorderLeft, NS_LITERAL_STRING("border-left")) -IMPL_CSSPROP(BorderTopColor, NS_LITERAL_STRING("border-top-color")) -IMPL_CSSPROP(BorderRightColor, NS_LITERAL_STRING("border-right-color")) -IMPL_CSSPROP(BorderBottomColor, NS_LITERAL_STRING("border-bottom-color")) -IMPL_CSSPROP(BorderLeftColor, NS_LITERAL_STRING("border-left-color")) -IMPL_CSSPROP(BorderTopStyle, NS_LITERAL_STRING("border-top-style")) -IMPL_CSSPROP(BorderRightStyle, NS_LITERAL_STRING("border-right-style")) -IMPL_CSSPROP(BorderBottomStyle, NS_LITERAL_STRING("border-bottom-style")) -IMPL_CSSPROP(BorderLeftStyle, NS_LITERAL_STRING("border-left-style")) -IMPL_CSSPROP(BorderTopWidth, NS_LITERAL_STRING("border-top-width")) -IMPL_CSSPROP(BorderRightWidth, NS_LITERAL_STRING("border-right-width")) -IMPL_CSSPROP(BorderBottomWidth, NS_LITERAL_STRING("border-bottom-width")) -IMPL_CSSPROP(BorderLeftWidth, NS_LITERAL_STRING("border-left-width")) -IMPL_CSSPROP(BorderWidth, NS_LITERAL_STRING("border-width")) -IMPL_CSSPROP(Bottom, NS_LITERAL_STRING("bottom")) -IMPL_CSSPROP(CaptionSide, NS_LITERAL_STRING("caption-side")) -IMPL_CSSPROP(Clear, NS_LITERAL_STRING("clear")) -IMPL_CSSPROP(Clip, NS_LITERAL_STRING("clip")) -IMPL_CSSPROP(Color, NS_LITERAL_STRING("color")) -IMPL_CSSPROP(Content, NS_LITERAL_STRING("content")) -IMPL_CSSPROP(CounterIncrement, NS_LITERAL_STRING("counter-increment")) -IMPL_CSSPROP(CounterReset, NS_LITERAL_STRING("counter-reset")) -IMPL_CSSPROP(CssFloat, NS_LITERAL_STRING("float")) -IMPL_CSSPROP(Cue, NS_LITERAL_STRING("cue")) -IMPL_CSSPROP(CueAfter, NS_LITERAL_STRING("cue-after")) -IMPL_CSSPROP(CueBefore, NS_LITERAL_STRING("cue-before")) -IMPL_CSSPROP(Cursor, NS_LITERAL_STRING("cursor")) -IMPL_CSSPROP(Direction, NS_LITERAL_STRING("direction")) -IMPL_CSSPROP(Display, NS_LITERAL_STRING("display")) -IMPL_CSSPROP(Elevation, NS_LITERAL_STRING("elevation")) -IMPL_CSSPROP(EmptyCells, NS_LITERAL_STRING("empty-cells")) -IMPL_CSSPROP(Font, NS_LITERAL_STRING("font")) -IMPL_CSSPROP(FontFamily, NS_LITERAL_STRING("font-family")) -IMPL_CSSPROP(FontSize, NS_LITERAL_STRING("font-size")) -IMPL_CSSPROP(FontSizeAdjust, NS_LITERAL_STRING("font-size-adjust")) -IMPL_CSSPROP(FontStretch, NS_LITERAL_STRING("font-stretch")) -IMPL_CSSPROP(FontStyle, NS_LITERAL_STRING("font-style")) -IMPL_CSSPROP(FontVariant, NS_LITERAL_STRING("font-variant")) -IMPL_CSSPROP(FontWeight, NS_LITERAL_STRING("font-weight")) -IMPL_CSSPROP(Height, NS_LITERAL_STRING("height")) -IMPL_CSSPROP(Left, NS_LITERAL_STRING("left")) -IMPL_CSSPROP(LetterSpacing, NS_LITERAL_STRING("letter-spacing")) -IMPL_CSSPROP(LineHeight, NS_LITERAL_STRING("line-height")) -IMPL_CSSPROP(ListStyle, NS_LITERAL_STRING("list-style")) -IMPL_CSSPROP(ListStyleImage, NS_LITERAL_STRING("list-style-image")) -IMPL_CSSPROP(ListStylePosition, NS_LITERAL_STRING("list-style-position")) -IMPL_CSSPROP(ListStyleType, NS_LITERAL_STRING("list-style-type")) -IMPL_CSSPROP(Margin, NS_LITERAL_STRING("margin")) -IMPL_CSSPROP(MarginTop, NS_LITERAL_STRING("margin-top")) -IMPL_CSSPROP(MarginRight, NS_LITERAL_STRING("margin-right")) -IMPL_CSSPROP(MarginBottom, NS_LITERAL_STRING("margin-bottom")) -IMPL_CSSPROP(MarginLeft, NS_LITERAL_STRING("margin-left")) -IMPL_CSSPROP(MarkerOffset, NS_LITERAL_STRING("marker-offset")) -IMPL_CSSPROP(Marks, NS_LITERAL_STRING("marks")) -IMPL_CSSPROP(MaxHeight, NS_LITERAL_STRING("max-height")) -IMPL_CSSPROP(MaxWidth, NS_LITERAL_STRING("max-width")) -IMPL_CSSPROP(MinHeight, NS_LITERAL_STRING("min-height")) -IMPL_CSSPROP(MinWidth, NS_LITERAL_STRING("min-width")) -IMPL_CSSPROP(Orphans, NS_LITERAL_STRING("orphans")) - // XXX Because of the renaming to -moz-outline, these 4 do nothing: -IMPL_CSSPROP(Outline, NS_LITERAL_STRING("outline")) -IMPL_CSSPROP(OutlineColor, NS_LITERAL_STRING("outline-color")) -IMPL_CSSPROP(OutlineStyle, NS_LITERAL_STRING("outline-style")) -IMPL_CSSPROP(OutlineWidth, NS_LITERAL_STRING("outline-width")) -IMPL_CSSPROP(Overflow, NS_LITERAL_STRING("overflow")) -IMPL_CSSPROP(Padding, NS_LITERAL_STRING("padding")) -IMPL_CSSPROP(PaddingTop, NS_LITERAL_STRING("padding-top")) -IMPL_CSSPROP(PaddingRight, NS_LITERAL_STRING("padding-right")) -IMPL_CSSPROP(PaddingBottom, NS_LITERAL_STRING("padding-bottom")) -IMPL_CSSPROP(PaddingLeft, NS_LITERAL_STRING("padding-left")) -IMPL_CSSPROP(Page, NS_LITERAL_STRING("page")) -IMPL_CSSPROP(PageBreakAfter, NS_LITERAL_STRING("page-break-after")) -IMPL_CSSPROP(PageBreakBefore, NS_LITERAL_STRING("page-break-before")) -IMPL_CSSPROP(PageBreakInside, NS_LITERAL_STRING("page-break-inside")) -IMPL_CSSPROP(Pause, NS_LITERAL_STRING("pause")) -IMPL_CSSPROP(PauseAfter, NS_LITERAL_STRING("pause-after")) -IMPL_CSSPROP(PauseBefore, NS_LITERAL_STRING("pause-before")) -IMPL_CSSPROP(Pitch, NS_LITERAL_STRING("pitch")) -IMPL_CSSPROP(PitchRange, NS_LITERAL_STRING("pitch-range")) -IMPL_CSSPROP(PlayDuring, NS_LITERAL_STRING("play-during")) -IMPL_CSSPROP(Position, NS_LITERAL_STRING("position")) -IMPL_CSSPROP(Quotes, NS_LITERAL_STRING("quotes")) -IMPL_CSSPROP(Richness, NS_LITERAL_STRING("richness")) -IMPL_CSSPROP(Right, NS_LITERAL_STRING("right")) -IMPL_CSSPROP(Size, NS_LITERAL_STRING("size")) -IMPL_CSSPROP(Speak, NS_LITERAL_STRING("speak")) -IMPL_CSSPROP(SpeakHeader, NS_LITERAL_STRING("speak-header")) -IMPL_CSSPROP(SpeakNumeral, NS_LITERAL_STRING("speak-numeral")) -IMPL_CSSPROP(SpeakPunctuation, NS_LITERAL_STRING("speak-punctuation")) -IMPL_CSSPROP(SpeechRate, NS_LITERAL_STRING("speech-rate")) -IMPL_CSSPROP(Stress, NS_LITERAL_STRING("stress")) -IMPL_CSSPROP(TableLayout, NS_LITERAL_STRING("table-layout")) -IMPL_CSSPROP(TextAlign, NS_LITERAL_STRING("text-align")) -IMPL_CSSPROP(TextDecoration, NS_LITERAL_STRING("text-decoration")) -IMPL_CSSPROP(TextIndent, NS_LITERAL_STRING("text-indent")) -IMPL_CSSPROP(TextShadow, NS_LITERAL_STRING("text-shadow")) -IMPL_CSSPROP(TextTransform, NS_LITERAL_STRING("text-transform")) -IMPL_CSSPROP(Top, NS_LITERAL_STRING("top")) -IMPL_CSSPROP(UnicodeBidi, NS_LITERAL_STRING("unicode-bidi")) -IMPL_CSSPROP(VerticalAlign, NS_LITERAL_STRING("vertical-align")) -IMPL_CSSPROP(Visibility, NS_LITERAL_STRING("visibility")) -IMPL_CSSPROP(VoiceFamily, NS_LITERAL_STRING("voice-family")) -IMPL_CSSPROP(Volume, NS_LITERAL_STRING("volume")) -IMPL_CSSPROP(WhiteSpace, NS_LITERAL_STRING("white-space")) -IMPL_CSSPROP(Widows, NS_LITERAL_STRING("widows")) -IMPL_CSSPROP(Width, NS_LITERAL_STRING("width")) -IMPL_CSSPROP(WordSpacing, NS_LITERAL_STRING("word-spacing")) -IMPL_CSSPROP(ZIndex, NS_LITERAL_STRING("z-index")) +#define CSS_PROP_INTERNAL(name_, id_, method_, hint_) /* nothing */ +#define CSS_PROP_NOTIMPLEMENTED(name_, id_, method_, hint_) \ + CSS_PROP(name_, id_, method_, hint_) - // nsIDOMNSCSS2Properties -IMPL_CSSPROP(MozBinding, NS_LITERAL_STRING("-moz-binding")) -IMPL_CSSPROP(MozBorderRadius, NS_LITERAL_STRING("-moz-border-radius")) -IMPL_CSSPROP(MozBorderRadiusTopleft, NS_LITERAL_STRING("-moz-border-radius-topleft")) -IMPL_CSSPROP(MozBorderRadiusTopright, NS_LITERAL_STRING("-moz-border-radius-topright")) -IMPL_CSSPROP(MozBorderRadiusBottomleft, NS_LITERAL_STRING("-moz-border-radius-bottomleft")) -IMPL_CSSPROP(MozBorderRadiusBottomright, NS_LITERAL_STRING("-moz-border-radius-bottomright")) -IMPL_CSSPROP(MozBoxAlign, NS_LITERAL_STRING("-moz-box-align")) -IMPL_CSSPROP(MozBoxDirection, NS_LITERAL_STRING("-moz-box-direction")) -IMPL_CSSPROP(MozBoxFlex, NS_LITERAL_STRING("-moz-box-flex")) -IMPL_CSSPROP(MozBoxFlexGroup, NS_LITERAL_STRING("-moz-box-flex-group")) -IMPL_CSSPROP(MozBoxOrient, NS_LITERAL_STRING("-moz-box-orient")) -IMPL_CSSPROP(MozBoxPack, NS_LITERAL_STRING("-moz-box-pack")) -IMPL_CSSPROP(MozBoxSizing, NS_LITERAL_STRING("-moz-box-sizing")) -IMPL_CSSPROP(MozFloatEdge, NS_LITERAL_STRING("-moz-float-edge")) -IMPL_CSSPROP(MozKeyEquivalent, NS_LITERAL_STRING("-moz-key-equivalent")) -IMPL_CSSPROP(MozOpacity, NS_LITERAL_STRING("-moz-opacity")) -IMPL_CSSPROP(MozOutline, NS_LITERAL_STRING("-moz-outline")) -IMPL_CSSPROP(MozOutlineColor, NS_LITERAL_STRING("-moz-outline-color")) -IMPL_CSSPROP(MozOutlineRadius, NS_LITERAL_STRING("-moz-outline-radius")) -IMPL_CSSPROP(MozOutlineRadiusTopleft, NS_LITERAL_STRING("-moz-outline-radius-topleft")) -IMPL_CSSPROP(MozOutlineRadiusTopright, NS_LITERAL_STRING("-moz-outline-radius-topright")) -IMPL_CSSPROP(MozOutlineRadiusBottomleft, NS_LITERAL_STRING("-moz-outline-radius-bottomleft")) -IMPL_CSSPROP(MozOutlineRadiusBottomright, NS_LITERAL_STRING("-moz-outline-radius-bottomright")) -IMPL_CSSPROP(MozOutlineStyle, NS_LITERAL_STRING("-moz-outline-style")) -IMPL_CSSPROP(MozOutlineWidth, NS_LITERAL_STRING("-moz-outline-width")) -IMPL_CSSPROP(MozResizer, NS_LITERAL_STRING("-moz-resizer")) -IMPL_CSSPROP(MozUserFocus, NS_LITERAL_STRING("-moz-user-focus")) -IMPL_CSSPROP(MozUserInput, NS_LITERAL_STRING("-moz-user-input")) -IMPL_CSSPROP(MozUserModify, NS_LITERAL_STRING("-moz-user-modify")) -IMPL_CSSPROP(MozUserSelect, NS_LITERAL_STRING("-moz-user-select")) +#include "nsCSSPropList.h" + +#undef CSS_PROP_INTERNAL +#undef CSS_PROP