--- a/layout/style/nsComputedDOMStyle.cpp
+++ b/layout/style/nsComputedDOMStyle.cpp
@@ -1093,48 +1093,21 @@ nsComputedDOMStyle::DoGetBinding()
} else {
val->SetIdent(eCSSKeyword_none);
}
return val.forget();
}
already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetClear()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(nsCSSProps::ValueToKeywordEnum(StyleDisplay()->mBreakType,
- nsCSSProps::kClearKTable));
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetFloat()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(nsCSSProps::ValueToKeywordEnum(StyleDisplay()->mFloat,
- nsCSSProps::kFloatKTable));
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetBottom()
{
return GetOffsetWidthFor(eSideBottom);
}
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetStackSizing()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(nsCSSProps::ValueToKeywordEnum(StyleXUL()->mStackSizing,
- nsCSSProps::kStackSizingKTable));
- return val.forget();
-}
-
void
nsComputedDOMStyle::SetToRGBAColor(nsROCSSPrimitiveValue* aValue,
nscolor aColor)
{
nsROCSSPrimitiveValue *red = new nsROCSSPrimitiveValue;
nsROCSSPrimitiveValue *green = new nsROCSSPrimitiveValue;
nsROCSSPrimitiveValue *blue = new nsROCSSPrimitiveValue;
nsROCSSPrimitiveValue *alpha = new nsROCSSPrimitiveValue;
@@ -1188,34 +1161,16 @@ already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetColor()
{
RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
SetToRGBAColor(val, StyleColor()->mColor);
return val.forget();
}
already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetColorAdjust()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(
- nsCSSProps::ValueToKeywordEnum(StyleVisibility()->mColorAdjust,
- nsCSSProps::kColorAdjustKTable));
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetOpacity()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetNumber(StyleEffects()->mOpacity);
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetColumnCount()
{
RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
const nsStyleColumn* column = StyleColumn();
if (column->mColumnCount == NS_STYLE_COLUMN_COUNT_AUTO) {
val->SetIdent(eCSSKeyword_auto);
@@ -1233,60 +1188,23 @@ nsComputedDOMStyle::DoGetColumnWidth()
// XXX fix the auto case. When we actually have a column frame, I think
// we should return the computed column width.
SetValueToCoord(val, StyleColumn()->mColumnWidth, true);
return val.forget();
}
already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetColumnFill()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(
- nsCSSProps::ValueToKeywordEnum(StyleColumn()->mColumnFill,
- nsCSSProps::kColumnFillKTable));
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetColumnSpan()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(nsCSSProps::ValueToKeywordEnum(StyleColumn()->mColumnSpan,
- nsCSSProps::kColumnSpanKTable));
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetColumnRuleWidth()
{
RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
val->SetAppUnits(StyleColumn()->GetComputedColumnRuleWidth());
return val.forget();
}
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetColumnRuleStyle()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(
- nsCSSProps::ValueToKeywordEnum(StyleColumn()->mColumnRuleStyle,
- nsCSSProps::kBorderStyleKTable));
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetColumnRuleColor()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- SetValueFromComplexColor(val, StyleColumn()->mColumnRuleColor);
- return val.forget();
-}
-
static void
AppendCounterStyle(CounterStyle* aStyle, nsAString& aString)
{
AnonymousCounterStyle* anonymous = aStyle->AsAnonymous();
if (!anonymous) {
// want SetIdent
nsDependentAtomString type(aStyle->GetStyleName());
nsStyleUtil::AppendEscapedCSSIdent(type, aString);
@@ -1521,52 +1439,32 @@ already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetPerspective()
{
RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
SetValueToCoord(val, StyleDisplay()->mChildPerspective, false);
return val.forget();
}
already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetBackfaceVisibility()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(
- nsCSSProps::ValueToKeywordEnum(StyleDisplay()->mBackfaceVisibility,
- nsCSSProps::kBackfaceVisibilityKTable));
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetTransformStyle()
{
RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
val->SetIdent(
nsCSSProps::ValueToKeywordEnum(StyleDisplay()->mTransformStyle,
nsCSSProps::kTransformStyleKTable));
return val.forget();
}
already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetTransform()
{
const nsStyleDisplay* display = StyleDisplay();
return GetTransformValue(display->mSpecifiedTransform);
}
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetTransformBox()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(
- nsCSSProps::ValueToKeywordEnum(StyleDisplay()->mTransformBox,
- nsCSSProps::kTransformBoxKTable));
- return val.forget();
-}
-
static already_AddRefed<CSSValue>
ReadIndividualTransformValue(nsCSSValueSharedList* aList,
const std::function<void(const nsCSSValue::Array*,
nsString&)>& aCallback)
{
if (!aList) {
RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
val->SetIdent(eCSSKeyword_none);
@@ -1915,24 +1813,16 @@ nsComputedDOMStyle::DoGetOsxFontSmoothin
RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
val->SetIdent(nsCSSProps::ValueToKeywordEnum(StyleFont()->mFont.smoothing,
nsCSSProps::kFontSmoothingKTable));
return val.forget();
}
already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetFontSmoothingBackgroundColor()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- SetToRGBAColor(val, StyleFont()->mFont.fontSmoothingBackgroundColor);
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetFontStretch()
{
RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
const nsStyleFont* font = StyleFont();
// Chrome does not return keywords, so neither do we.
// See w3c/csswg-drafts#2605 for discussion though.
@@ -2019,26 +1909,16 @@ nsComputedDOMStyle::DoGetFontVariationSe
nsAutoString result;
nsStyleUtil::AppendFontVariationSettings(font->mFont.fontVariationSettings,
result);
val->SetString(result);
}
return val.forget();
}
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetFontKerning()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(
- nsCSSProps::ValueToKeywordEnum(StyleFont()->mFont.kerning,
- nsCSSProps::kFontKerningKTable));
- return val.forget();
-}
-
static void
SerializeLanguageOverride(uint32_t aLanguageOverride, nsAString& aResult)
{
aResult.Truncate();
uint32_t i;
for (i = 0; i < 4 ; i++) {
char16_t ch = aLanguageOverride >> 24;
MOZ_ASSERT(nsCRT::IsAscii(ch),
@@ -2066,26 +1946,16 @@ nsComputedDOMStyle::DoGetFontLanguageOve
SerializeLanguageOverride(font->mFont.languageOverride, serializedStr);
nsStyleUtil::AppendEscapedCSSString(serializedStr, escapedStr);
val->SetString(escapedStr);
}
return val.forget();
}
already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetFontOpticalSizing()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(
- nsCSSProps::ValueToKeywordEnum(StyleFont()->mFont.opticalSizing,
- nsCSSProps::kFontOpticalSizingKTable));
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetFontSynthesis()
{
RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
int32_t intValue = StyleFont()->mFont.synthesis;
if (0 == intValue) {
val->SetIdent(eCSSKeyword_none);
@@ -2161,34 +2031,16 @@ nsComputedDOMStyle::DoGetFontVariantAlte
valueStr);
}
val->SetString(valueStr);
return val.forget();
}
already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetFontVariantCaps()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
-
- int32_t intValue = StyleFont()->mFont.variantCaps;
-
- if (0 == intValue) {
- val->SetIdent(eCSSKeyword_normal);
- } else {
- val->SetIdent(
- nsCSSProps::ValueToKeywordEnum(intValue,
- nsCSSProps::kFontVariantCapsKTable));
- }
-
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetFontVariantEastAsian()
{
RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
int32_t intValue = StyleFont()->mFont.variantEastAsian;
if (0 == intValue) {
val->SetIdent(eCSSKeyword_normal);
@@ -2249,60 +2101,16 @@ nsComputedDOMStyle::DoGetFontVariantNume
NS_FONT_VARIANT_NUMERIC_ORDINAL,
valueStr);
val->SetString(valueStr);
}
return val.forget();
}
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetFontVariantPosition()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
-
- int32_t intValue = StyleFont()->mFont.variantPosition;
-
- if (0 == intValue) {
- val->SetIdent(eCSSKeyword_normal);
- } else {
- val->SetIdent(
- nsCSSProps::ValueToKeywordEnum(intValue,
- nsCSSProps::kFontVariantPositionKTable));
- }
-
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetBackgroundAttachment()
-{
- return GetBackgroundList(&nsStyleImageLayers::Layer::mAttachment,
- &nsStyleImageLayers::mAttachmentCount,
- StyleBackground()->mImage,
- nsCSSProps::kImageLayerAttachmentKTable);
-}
-
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetBackgroundClip()
-{
- return GetBackgroundList(&nsStyleImageLayers::Layer::mClip,
- &nsStyleImageLayers::mClipCount,
- StyleBackground()->mImage,
- nsCSSProps::kBackgroundClipKTable);
-}
-
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetBackgroundColor()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- SetValueFromComplexColor(val, StyleBackground()->mBackgroundColor);
- return val.forget();
-}
-
static void
SetValueToCalc(const nsStyleCoord::CalcValue* aCalc,
nsROCSSPrimitiveValue* aValue)
{
RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
nsAutoString tmp, result;
result.AppendLiteral("calc(");
@@ -2805,34 +2613,16 @@ nsComputedDOMStyle::DoGetImageLayerSize(
already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetBackgroundImage()
{
const nsStyleImageLayers& layers = StyleBackground()->mImage;
return DoGetImageLayerImage(layers);
}
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetBackgroundBlendMode()
-{
- return GetBackgroundList(&nsStyleImageLayers::Layer::mBlendMode,
- &nsStyleImageLayers::mBlendModeCount,
- StyleBackground()->mImage,
- nsCSSProps::kBlendModeKTable);
-}
-
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetBackgroundOrigin()
-{
- return GetBackgroundList(&nsStyleImageLayers::Layer::mOrigin,
- &nsStyleImageLayers::mOriginCount,
- StyleBackground()->mImage,
- nsCSSProps::kBackgroundOriginKTable);
-}
-
void
nsComputedDOMStyle::SetValueToPositionCoord(
const Position::Coord& aCoord,
nsROCSSPrimitiveValue* aValue)
{
if (!aCoord.mHasPercent) {
MOZ_ASSERT(aCoord.mPercent == 0.0f,
"Shouldn't have mPercent!");
@@ -3454,26 +3244,16 @@ nsComputedDOMStyle::DoGetPaddingLeft()
already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetPaddingRight()
{
return GetPaddingWidthFor(eSideRight);
}
already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetBorderCollapse()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(
- nsCSSProps::ValueToKeywordEnum(StyleTableBorder()->mBorderCollapse,
- nsCSSProps::kBorderCollapseKTable));
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetBorderSpacing()
{
RefPtr<nsDOMCSSValueList> valueList = GetROCSSValueList(false);
RefPtr<nsROCSSPrimitiveValue> xSpacing = new nsROCSSPrimitiveValue;
RefPtr<nsROCSSPrimitiveValue> ySpacing = new nsROCSSPrimitiveValue;
const nsStyleTableBorder *border = StyleTableBorder();
@@ -3482,46 +3262,16 @@ nsComputedDOMStyle::DoGetBorderSpacing()
valueList->AppendCSSValue(xSpacing.forget());
valueList->AppendCSSValue(ySpacing.forget());
return valueList.forget();
}
already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetCaptionSide()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(
- nsCSSProps::ValueToKeywordEnum(StyleTableBorder()->mCaptionSide,
- nsCSSProps::kCaptionSideKTable));
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetEmptyCells()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(
- nsCSSProps::ValueToKeywordEnum(StyleTableBorder()->mEmptyCells,
- nsCSSProps::kEmptyCellsKTable));
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetTableLayout()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(
- nsCSSProps::ValueToKeywordEnum(StyleTable()->mLayoutStrategy,
- nsCSSProps::kTableLayoutKTable));
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetBorderTopStyle()
{
return GetBorderStyleFor(eSideTop);
}
already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetBorderBottomStyle()
{
@@ -3588,40 +3338,16 @@ nsComputedDOMStyle::DoGetBorderLeftWidth
already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetBorderRightWidth()
{
return GetBorderWidthFor(eSideRight);
}
already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetBorderTopColor()
-{
- return GetBorderColorFor(eSideTop);
-}
-
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetBorderBottomColor()
-{
- return GetBorderColorFor(eSideBottom);
-}
-
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetBorderLeftColor()
-{
- return GetBorderColorFor(eSideLeft);
-}
-
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetBorderRightColor()
-{
- return GetBorderColorFor(eSideRight);
-}
-
-already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetMarginTopWidth()
{
return GetMarginWidthFor(eSideTop);
}
already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetMarginBottomWidth()
{
@@ -3636,36 +3362,16 @@ nsComputedDOMStyle::DoGetMarginLeftWidth
already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetMarginRightWidth()
{
return GetMarginWidthFor(eSideRight);
}
already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetOrient()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(
- nsCSSProps::ValueToKeywordEnum(StyleDisplay()->mOrient,
- nsCSSProps::kOrientKTable));
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetScrollBehavior()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(
- nsCSSProps::ValueToKeywordEnum(StyleDisplay()->mScrollBehavior,
- nsCSSProps::kScrollBehaviorKTable));
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetOverscrollBehaviorX()
{
RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
val->SetIdent(
nsCSSProps::ValueToKeywordEnum(StyleDisplay()->mOverscrollBehaviorX,
nsCSSProps::kOverscrollBehaviorKTable));
return val.forget();
}
@@ -3676,32 +3382,16 @@ nsComputedDOMStyle::DoGetOverscrollBehav
RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
val->SetIdent(
nsCSSProps::ValueToKeywordEnum(StyleDisplay()->mOverscrollBehaviorY,
nsCSSProps::kOverscrollBehaviorKTable));
return val.forget();
}
already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetScrollSnapType()
-{
- const nsStyleDisplay* display = StyleDisplay();
- if (display->mScrollSnapTypeX != display->mScrollSnapTypeY) {
- // No value to return. We can't express this combination of
- // values as a shorthand.
- return nullptr;
- }
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(
- nsCSSProps::ValueToKeywordEnum(StyleDisplay()->mScrollSnapTypeX,
- nsCSSProps::kScrollSnapTypeKTable));
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetScrollSnapTypeX()
{
RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
val->SetIdent(
nsCSSProps::ValueToKeywordEnum(StyleDisplay()->mScrollSnapTypeX,
nsCSSProps::kScrollSnapTypeKTable));
return val.forget();
}
@@ -3817,24 +3507,16 @@ nsComputedDOMStyle::DoGetOutlineStyle()
RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
val->SetIdent(
nsCSSProps::ValueToKeywordEnum(StyleOutline()->mOutlineStyle,
nsCSSProps::kOutlineStyleKTable));
return val.forget();
}
already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetOutlineOffset()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetAppUnits(StyleOutline()->mOutlineOffset);
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetOutlineRadiusBottomLeft()
{
return GetEllipseRadii(StyleOutline()->mOutlineRadius,
eCornerBottomLeft);
}
already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetOutlineRadiusBottomRight()
@@ -3853,24 +3535,16 @@ nsComputedDOMStyle::DoGetOutlineRadiusTo
already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetOutlineRadiusTopRight()
{
return GetEllipseRadii(StyleOutline()->mOutlineRadius,
eCornerTopRight);
}
already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetOutlineColor()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- SetValueFromComplexColor(val, StyleOutline()->mOutlineColor);
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
nsComputedDOMStyle::GetEllipseRadii(const nsStyleCorners& aRadius,
Corner aFullCorner)
{
nsStyleCoord radiusX = aRadius.Get(FullToHalfCorner(aFullCorner, false));
nsStyleCoord radiusY = aRadius.Get(FullToHalfCorner(aFullCorner, true));
// for compatibility, return a single value if X and Y are equal
if (radiusX == radiusY) {
@@ -3956,26 +3630,16 @@ nsComputedDOMStyle::GetCSSShadowArray(ns
}
valueList->AppendCSSValue(itemList.forget());
}
return valueList.forget();
}
already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetBoxDecorationBreak()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(
- nsCSSProps::ValueToKeywordEnum(StyleBorder()->mBoxDecorationBreak,
- nsCSSProps::kBoxDecorationBreakKTable));
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetBoxShadow()
{
return GetCSSShadowArray(StyleEffects()->mBoxShadow, true);
}
already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetZIndex()
{
@@ -3995,26 +3659,16 @@ nsComputedDOMStyle::DoGetListStyleImage(
} else {
val->SetURI(uri);
}
return val.forget();
}
already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetListStylePosition()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(
- nsCSSProps::ValueToKeywordEnum(StyleList()->mListStylePosition,
- nsCSSProps::kListStylePositionKTable));
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetListStyleType()
{
RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
nsAutoString tmp;
AppendCounterStyle(StyleList()->mCounterStyle, tmp);
val->SetString(tmp);
return val.forget();
}
@@ -4077,34 +3731,16 @@ nsComputedDOMStyle::DoGetLineHeight()
SetValueToCoord(val, StyleText()->mLineHeight, true,
nullptr, nsCSSProps::kLineHeightKTable);
}
return val.forget();
}
already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetRubyAlign()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(nsCSSProps::ValueToKeywordEnum(
- StyleText()->mRubyAlign, nsCSSProps::kRubyAlignKTable));
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetRubyPosition()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(nsCSSProps::ValueToKeywordEnum(
- StyleText()->mRubyPosition, nsCSSProps::kRubyPositionKTable));
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetVerticalAlign()
{
RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
SetValueToCoord(val, StyleDisplay()->mVerticalAlign, false,
nullptr, nsCSSProps::kVerticalAlignKTable);
return val.forget();
}
@@ -4131,37 +3767,16 @@ already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetTextAlign()
{
const nsStyleText* style = StyleText();
return CreateTextAlignValue(style->mTextAlign, style->mTextAlignTrue,
nsCSSProps::kTextAlignKTable);
}
already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetTextAlignLast()
-{
- const nsStyleText* style = StyleText();
- return CreateTextAlignValue(style->mTextAlignLast, style->mTextAlignLastTrue,
- nsCSSProps::kTextAlignLastKTable);
-}
-
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetTextCombineUpright()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- uint8_t tch = StyleText()->mTextCombineUpright;
-
- val->SetIdent(
- nsCSSProps::ValueToKeywordEnum(tch,
- nsCSSProps::kTextCombineUprightKTable));
-
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetTextDecoration()
{
const nsStyleTextReset* textReset = StyleTextReset();
bool isInitialStyle =
textReset->mTextDecorationStyle == NS_STYLE_TEXT_DECORATION_STYLE_SOLID;
StyleComplexColor color = textReset->mTextDecorationColor;
@@ -4223,24 +3838,16 @@ nsComputedDOMStyle::DoGetTextDecorationS
val->SetIdent(
nsCSSProps::ValueToKeywordEnum(StyleTextReset()->mTextDecorationStyle,
nsCSSProps::kTextDecorationStyleKTable));
return val.forget();
}
already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetTextEmphasisColor()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- SetValueFromComplexColor(val, StyleText()->mTextEmphasisColor);
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetTextEmphasisPosition()
{
auto position = StyleText()->mTextEmphasisPosition;
MOZ_ASSERT(!(position & NS_STYLE_TEXT_EMPHASIS_POSITION_OVER) !=
!(position & NS_STYLE_TEXT_EMPHASIS_POSITION_UNDER));
RefPtr<nsROCSSPrimitiveValue> first = new nsROCSSPrimitiveValue;
first->SetIdent((position & NS_STYLE_TEXT_EMPHASIS_POSITION_OVER) ?
@@ -4301,36 +3908,16 @@ already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetTextIndent()
{
RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
SetValueToCoord(val, StyleText()->mTextIndent, false);
return val.forget();
}
already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetTextJustify()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(
- nsCSSProps::ValueToKeywordEnum(StyleText()->mTextJustify,
- nsCSSProps::kTextJustifyKTable));
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetTextOrientation()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(
- nsCSSProps::ValueToKeywordEnum(StyleVisibility()->mTextOrientation,
- nsCSSProps::kTextOrientationKTable));
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetTextOverflow()
{
const nsStyleTextReset *style = StyleTextReset();
RefPtr<nsROCSSPrimitiveValue> first = new nsROCSSPrimitiveValue;
const nsStyleTextOverflowSide *side = style->mTextOverflow.GetFirstValue();
if (side->mType == NS_STYLE_TEXT_OVERFLOW_STRING) {
nsAutoString str;
nsStyleUtil::AppendEscapedCSSString(side->mString, str);
@@ -4363,35 +3950,16 @@ nsComputedDOMStyle::DoGetTextOverflow()
already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetTextShadow()
{
return GetCSSShadowArray(StyleText()->mTextShadow, false);
}
already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetTextSizeAdjust()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(nsCSSProps::ValueToKeywordEnum(StyleText()->mTextSizeAdjust,
- nsCSSProps::kTextSizeAdjustKTable));
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetTextTransform()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(
- nsCSSProps::ValueToKeywordEnum(StyleText()->mTextTransform,
- nsCSSProps::kTextTransformKTable));
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetTabSize()
{
RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
SetValueToCoord(val, StyleText()->mTabSize, true);
return val.forget();
}
already_AddRefed<CSSValue>
@@ -4406,187 +3974,27 @@ already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetWordSpacing()
{
RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
SetValueToCoord(val, StyleText()->mWordSpacing, false);
return val.forget();
}
already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetWhiteSpace()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(
- nsCSSProps::ValueToKeywordEnum(StyleText()->mWhiteSpace,
- nsCSSProps::kWhitespaceKTable));
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetWindowDragging()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(
- nsCSSProps::ValueToKeywordEnum(StyleUIReset()->mWindowDragging,
- nsCSSProps::kWindowDraggingKTable));
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetWindowShadow()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(
- nsCSSProps::ValueToKeywordEnum(StyleUIReset()->mWindowShadow,
- nsCSSProps::kWindowShadowKTable));
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetWindowOpacity()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetNumber(StyleUIReset()->mWindowOpacity);
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetWindowTransform()
-{
- const nsStyleUIReset* uiReset = StyleUIReset();
- return GetTransformValue(uiReset->mSpecifiedWindowTransform);
-}
-
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetWindowTransformOrigin()
-{
- RefPtr<nsDOMCSSValueList> valueList = GetROCSSValueList(false);
-
- const nsStyleUIReset* uiReset = StyleUIReset();
-
- RefPtr<nsROCSSPrimitiveValue> originX = new nsROCSSPrimitiveValue;
- SetValueToCoord(originX, uiReset->mWindowTransformOrigin[0], false,
- &nsComputedDOMStyle::GetFrameBoundsWidthForTransform);
- valueList->AppendCSSValue(originX.forget());
-
- RefPtr<nsROCSSPrimitiveValue> originY = new nsROCSSPrimitiveValue;
- SetValueToCoord(originY, uiReset->mWindowTransformOrigin[1], false,
- &nsComputedDOMStyle::GetFrameBoundsHeightForTransform);
- valueList->AppendCSSValue(originY.forget());
-
- return valueList.forget();
-}
-
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetWordBreak()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(
- nsCSSProps::ValueToKeywordEnum(StyleText()->mWordBreak,
- nsCSSProps::kWordBreakKTable));
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetOverflowWrap()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(
- nsCSSProps::ValueToKeywordEnum(StyleText()->mOverflowWrap,
- nsCSSProps::kOverflowWrapKTable));
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetHyphens()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(
- nsCSSProps::ValueToKeywordEnum(StyleText()->mHyphens,
- nsCSSProps::kHyphensKTable));
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetWebkitTextFillColor()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- SetValueFromComplexColor(val, StyleText()->mWebkitTextFillColor);
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetWebkitTextStrokeColor()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- SetValueFromComplexColor(val, StyleText()->mWebkitTextStrokeColor);
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetWebkitTextStrokeWidth()
{
RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
val->SetAppUnits(StyleText()->mWebkitTextStrokeWidth);
return val.forget();
}
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetPointerEvents()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(
- nsCSSProps::ValueToKeywordEnum(StyleUserInterface()->mPointerEvents,
- nsCSSProps::kPointerEventsKTable));
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetVisibility()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(nsCSSProps::ValueToKeywordEnum(StyleVisibility()->mVisible,
- nsCSSProps::kVisibilityKTable));
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetWritingMode()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(
- nsCSSProps::ValueToKeywordEnum(StyleVisibility()->mWritingMode,
- nsCSSProps::kWritingModeKTable));
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetDirection()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(
- nsCSSProps::ValueToKeywordEnum(StyleVisibility()->mDirection,
- nsCSSProps::kDirectionKTable));
- return val.forget();
-}
-
static_assert(NS_STYLE_UNICODE_BIDI_NORMAL == 0,
"unicode-bidi style constants not as expected");
already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetUnicodeBidi()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(
- nsCSSProps::ValueToKeywordEnum(StyleTextReset()->mUnicodeBidi,
- nsCSSProps::kUnicodeBidiKTable));
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetCaretColor()
{
RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
SetValueFromComplexColor(val, StyleUserInterface()->mCaretColor);
return val.forget();
}
already_AddRefed<CSSValue>
@@ -4618,90 +4026,25 @@ nsComputedDOMStyle::DoGetCursor()
RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
val->SetIdent(nsCSSProps::ValueToKeywordEnum(ui->mCursor,
nsCSSProps::kCursorKTable));
valueList->AppendCSSValue(val.forget());
return valueList.forget();
}
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetAppearance()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(nsCSSProps::ValueToKeywordEnum(StyleDisplay()->mAppearance,
- nsCSSProps::kAppearanceKTable));
- return val.forget();
-}
-
-
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetBoxAlign()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(nsCSSProps::ValueToKeywordEnum(StyleXUL()->mBoxAlign,
- nsCSSProps::kBoxAlignKTable));
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetBoxDirection()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(
- nsCSSProps::ValueToKeywordEnum(StyleXUL()->mBoxDirection,
- nsCSSProps::kBoxDirectionKTable));
- return val.forget();
-}
already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetBoxFlex()
{
RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
val->SetNumber(StyleXUL()->mBoxFlex);
return val.forget();
}
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetBoxOrdinalGroup()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetNumber(StyleXUL()->mBoxOrdinal);
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetBoxOrient()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(
- nsCSSProps::ValueToKeywordEnum(StyleXUL()->mBoxOrient,
- nsCSSProps::kBoxOrientKTable));
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetBoxPack()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(nsCSSProps::ValueToKeywordEnum(StyleXUL()->mBoxPack,
- nsCSSProps::kBoxPackKTable));
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetBoxSizing()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(
- nsCSSProps::ValueToKeywordEnum(StylePosition()->mBoxSizing,
- nsCSSProps::kBoxSizingKTable));
- return val.forget();
-}
-
/* Border image properties */
already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetBorderImageSource()
{
const nsStyleBorder* border = StyleBorder();
RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
@@ -4812,60 +4155,32 @@ nsComputedDOMStyle::DoGetFlexBasis()
// }
SetValueToCoord(val, StylePosition()->mFlexBasis, true,
nullptr, nsCSSProps::kFlexBasisKTable);
return val.forget();
}
already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetFlexDirection()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(
- nsCSSProps::ValueToKeywordEnum(StylePosition()->mFlexDirection,
- nsCSSProps::kFlexDirectionKTable));
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetFlexGrow()
{
RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
val->SetNumber(StylePosition()->mFlexGrow);
return val.forget();
}
already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetFlexShrink()
{
RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
val->SetNumber(StylePosition()->mFlexShrink);
return val.forget();
}
already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetFlexWrap()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(
- nsCSSProps::ValueToKeywordEnum(StylePosition()->mFlexWrap,
- nsCSSProps::kFlexWrapKTable));
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetOrder()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetNumber(StylePosition()->mOrder);
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetAlignContent()
{
RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
nsAutoString str;
auto align = StylePosition()->mAlignContent;
nsCSSValue::AppendAlignJustifyValueToString(align & NS_STYLE_ALIGN_ALL_BITS, str);
auto fallback = align >> NS_STYLE_ALIGN_ALL_SHIFT;
if (fallback) {
@@ -4935,26 +4250,16 @@ nsComputedDOMStyle::DoGetJustifySelf()
nsAutoString str;
auto justify = StylePosition()->mJustifySelf;
nsCSSValue::AppendAlignJustifyValueToString(justify, str);
val->SetString(str);
return val.forget();
}
already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetFloatEdge()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(
- nsCSSProps::ValueToKeywordEnum(uint8_t(StyleBorder()->mFloatEdge),
- nsCSSProps::kFloatEdgeKTable));
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetForceBrokenImageIcon()
{
RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
val->SetNumber(StyleUIReset()->mForceBrokenImageIcon);
return val.forget();
}
already_AddRefed<CSSValue>
@@ -4974,66 +4279,16 @@ nsComputedDOMStyle::DoGetImageOrientatio
}
}
val->SetString(string);
return val.forget();
}
already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetIMEMode()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(
- nsCSSProps::ValueToKeywordEnum(StyleUIReset()->mIMEMode,
- nsCSSProps::kIMEModeKTable));
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetUserFocus()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(
- nsCSSProps::ValueToKeywordEnum(uint8_t(StyleUserInterface()->mUserFocus),
- nsCSSProps::kUserFocusKTable));
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetUserInput()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(
- nsCSSProps::ValueToKeywordEnum(StyleUserInterface()->mUserInput,
- nsCSSProps::kUserInputKTable));
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetUserModify()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(
- nsCSSProps::ValueToKeywordEnum(StyleUserInterface()->mUserModify,
- nsCSSProps::kUserModifyKTable));
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetUserSelect()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(
- nsCSSProps::ValueToKeywordEnum(StyleUIReset()->mUserSelect,
- nsCSSProps::kUserSelectKTable));
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetDisplay()
{
RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
val->SetIdent(nsCSSProps::ValueToKeywordEnum(StyleDisplay()->mDisplay,
nsCSSProps::kDisplayKTable));
return val.forget();
}
@@ -5062,25 +4317,16 @@ nsComputedDOMStyle::DoGetContain()
valueStr);
val->SetString(valueStr);
}
return val.forget();
}
already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetPosition()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(nsCSSProps::ValueToKeywordEnum(StyleDisplay()->mPosition,
- nsCSSProps::kPositionKTable));
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetClip()
{
RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
const nsStyleEffects* effects = StyleEffects();
if (effects->mClipFlags == NS_STYLE_CLIP_AUTO) {
val->SetIdent(eCSSKeyword_auto);
@@ -5161,26 +4407,16 @@ nsComputedDOMStyle::DoGetOverflow()
overflowY->SetIdent(
nsCSSProps::ValueToKeywordEnum(display->mOverflowY,
nsCSSProps::kOverflowKTable));
valueList->AppendCSSValue(overflowY.forget());
return valueList.forget();
}
already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetOverflowX()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(
- nsCSSProps::ValueToKeywordEnum(StyleDisplay()->mOverflowX,
- nsCSSProps::kOverflowSubKTable));
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetOverflowY()
{
RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
val->SetIdent(
nsCSSProps::ValueToKeywordEnum(StyleDisplay()->mOverflowY,
nsCSSProps::kOverflowSubKTable));
return val.forget();
}
@@ -5200,66 +4436,16 @@ nsComputedDOMStyle::DoGetOverflowClipBox
{
RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
val->SetIdent(
nsCSSProps::ValueToKeywordEnum(StyleDisplay()->mOverflowClipBoxInline,
nsCSSProps::kOverflowClipBoxKTable));
return val.forget();
}
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetResize()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(nsCSSProps::ValueToKeywordEnum(StyleDisplay()->mResize,
- nsCSSProps::kResizeKTable));
- return val.forget();
-}
-
-
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetPageBreakAfter()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
-
- const nsStyleDisplay *display = StyleDisplay();
-
- if (display->mBreakAfter) {
- val->SetIdent(eCSSKeyword_always);
- } else {
- val->SetIdent(eCSSKeyword_auto);
- }
-
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetPageBreakBefore()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
-
- const nsStyleDisplay *display = StyleDisplay();
-
- if (display->mBreakBefore) {
- val->SetIdent(eCSSKeyword_always);
- } else {
- val->SetIdent(eCSSKeyword_auto);
- }
-
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetPageBreakInside()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(nsCSSProps::ValueToKeywordEnum(StyleDisplay()->mBreakInside,
- nsCSSProps::kPageBreakInsideKTable));
- return val.forget();
-}
already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetTouchAction()
{
RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
int32_t intValue = StyleDisplay()->mTouchAction;
@@ -5428,43 +4614,16 @@ nsComputedDOMStyle::DoGetMinWidth()
minWidth.SetCoordValue(0);
}
SetValueToCoord(val, minWidth, true, nullptr, nsCSSProps::kWidthKTable);
return val.forget();
}
already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetMixBlendMode()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(nsCSSProps::ValueToKeywordEnum(StyleEffects()->mMixBlendMode,
- nsCSSProps::kBlendModeKTable));
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetIsolation()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(nsCSSProps::ValueToKeywordEnum(StyleDisplay()->mIsolation,
- nsCSSProps::kIsolationKTable));
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetObjectFit()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(nsCSSProps::ValueToKeywordEnum(StylePosition()->mObjectFit,
- nsCSSProps::kObjectFitKTable));
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetObjectPosition()
{
RefPtr<nsDOMCSSValueList> valueList = GetROCSSValueList(false);
SetValueToPosition(StylePosition()->mObjectPosition, valueList);
return valueList.forget();
}
already_AddRefed<CSSValue>
@@ -6212,196 +5371,39 @@ already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetStrokeWidth()
{
RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
SetValueToCoord(val, StyleSVG()->mStrokeWidth, true);
return val.forget();
}
already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetVectorEffect()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(nsCSSProps::ValueToKeywordEnum(StyleSVGReset()->mVectorEffect,
- nsCSSProps::kVectorEffectKTable));
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetFillOpacity()
{
RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
val->SetNumber(StyleSVG()->mFillOpacity);
return val.forget();
}
already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetFloodOpacity()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetNumber(StyleSVGReset()->mFloodOpacity);
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetStopOpacity()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetNumber(StyleSVGReset()->mStopOpacity);
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetStrokeMiterlimit()
{
RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
val->SetNumber(StyleSVG()->mStrokeMiterlimit);
return val.forget();
}
already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetStrokeOpacity()
{
RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
val->SetNumber(StyleSVG()->mStrokeOpacity);
return val.forget();
}
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetClipRule()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(nsCSSProps::ValueToKeywordEnum(
- StyleSVG()->mClipRule, nsCSSProps::kFillRuleKTable));
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetFillRule()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(nsCSSProps::ValueToKeywordEnum(
- StyleSVG()->mFillRule, nsCSSProps::kFillRuleKTable));
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetStrokeLinecap()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(
- nsCSSProps::ValueToKeywordEnum(StyleSVG()->mStrokeLinecap,
- nsCSSProps::kStrokeLinecapKTable));
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetStrokeLinejoin()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(
- nsCSSProps::ValueToKeywordEnum(StyleSVG()->mStrokeLinejoin,
- nsCSSProps::kStrokeLinejoinKTable));
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetTextAnchor()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(
- nsCSSProps::ValueToKeywordEnum(StyleSVG()->mTextAnchor,
- nsCSSProps::kTextAnchorKTable));
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetColorInterpolation()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(
- nsCSSProps::ValueToKeywordEnum(StyleSVG()->mColorInterpolation,
- nsCSSProps::kColorInterpolationKTable));
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetColorInterpolationFilters()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(
- nsCSSProps::ValueToKeywordEnum(StyleSVG()->mColorInterpolationFilters,
- nsCSSProps::kColorInterpolationKTable));
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetDominantBaseline()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(
- nsCSSProps::ValueToKeywordEnum(StyleSVGReset()->mDominantBaseline,
- nsCSSProps::kDominantBaselineKTable));
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetImageRendering()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(
- nsCSSProps::ValueToKeywordEnum(StyleVisibility()->mImageRendering,
- nsCSSProps::kImageRenderingKTable));
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetShapeRendering()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(
- nsCSSProps::ValueToKeywordEnum(StyleSVG()->mShapeRendering,
- nsCSSProps::kShapeRenderingKTable));
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetTextRendering()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(
- nsCSSProps::ValueToKeywordEnum(StyleText()->mTextRendering,
- nsCSSProps::kTextRenderingKTable));
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetFloodColor()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- SetValueFromComplexColor(val, StyleSVGReset()->mFloodColor);
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetLightingColor()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- SetValueFromComplexColor(val, StyleSVGReset()->mLightingColor);
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetStopColor()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- SetValueFromComplexColor(val, StyleSVGReset()->mStopColor);
- return val.forget();
-}
-
void
nsComputedDOMStyle::BoxValuesToString(nsAString& aString,
const nsTArray<nsStyleCoord>& aBoxValues,
bool aClampNegativeCalc)
{
MOZ_ASSERT(aBoxValues.Length() == 4, "wrong number of box values");
nsAutoString value1, value2, value3, value4;
SetCssTextToCoord(value1, aBoxValues[0], aClampNegativeCalc);
@@ -6590,24 +5592,16 @@ nsComputedDOMStyle::GetShapeSource(
already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetClipPath()
{
return GetShapeSource(StyleSVGReset()->mClipPath,
nsCSSProps::kClipPathGeometryBoxKTable);
}
already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetShapeImageThreshold()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetNumber(StyleDisplay()->mShapeImageThreshold);
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetShapeMargin()
{
RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
SetValueToCoord(val, StyleDisplay()->mShapeMargin, true);
return val.forget();
}
already_AddRefed<CSSValue>
@@ -6714,59 +5708,23 @@ nsComputedDOMStyle::DoGetMask()
RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
SetValueToURLValue(firstLayer.mImage.GetURLValue(), val);
return val.forget();
}
already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetMaskClip()
-{
- return GetBackgroundList(&nsStyleImageLayers::Layer::mClip,
- &nsStyleImageLayers::mClipCount,
- StyleSVGReset()->mMask,
- nsCSSProps::kMaskClipKTable);
-}
-
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetMaskComposite()
-{
- return GetBackgroundList(&nsStyleImageLayers::Layer::mComposite,
- &nsStyleImageLayers::mCompositeCount,
- StyleSVGReset()->mMask,
- nsCSSProps::kImageLayerCompositeKTable);
-}
-
-already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetMaskImage()
{
const nsStyleImageLayers& layers = StyleSVGReset()->mMask;
return DoGetImageLayerImage(layers);
}
already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetMaskMode()
-{
- return GetBackgroundList(&nsStyleImageLayers::Layer::mMaskMode,
- &nsStyleImageLayers::mMaskModeCount,
- StyleSVGReset()->mMask,
- nsCSSProps::kImageLayerModeKTable);
-}
-
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetMaskOrigin()
-{
- return GetBackgroundList(&nsStyleImageLayers::Layer::mOrigin,
- &nsStyleImageLayers::mOriginCount,
- StyleSVGReset()->mMask,
- nsCSSProps::kMaskOriginKTable);
-}
-
-already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetMaskPosition()
{
const nsStyleImageLayers& layers = StyleSVGReset()->mMask;
return DoGetImageLayerPosition(layers);
}
already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetMaskPositionX()
@@ -6792,47 +5750,16 @@ nsComputedDOMStyle::DoGetMaskRepeat()
already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetMaskSize()
{
const nsStyleImageLayers& layers = StyleSVGReset()->mMask;
return DoGetImageLayerSize(layers);
}
already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetMaskType()
-{
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(
- nsCSSProps::ValueToKeywordEnum(StyleSVGReset()->mMaskType,
- nsCSSProps::kMaskTypeKTable));
- return val.forget();
-}
-
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetContextProperties()
-{
- const nsTArray<RefPtr<nsAtom>>& contextProps = StyleSVG()->mContextProps;
-
- if (contextProps.IsEmpty()) {
- RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
- val->SetIdent(eCSSKeyword_none);
- return val.forget();
- }
-
- RefPtr<nsDOMCSSValueList> valueList = GetROCSSValueList(true);
- for (const nsAtom* ident : contextProps) {
- RefPtr<nsROCSSPrimitiveValue> property = new nsROCSSPrimitiveValue;
- property->SetString(nsDependentAtomString(ident));
- valueList->AppendCSSValue(property.forget());
- }
-
- return valueList.forget();
-}
-
-already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetPaintOrder()
{
RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
nsAutoString string;
uint8_t paintOrder = StyleSVG()->mPaintOrder;
nsStyleUtil::AppendPaintOrderValue(paintOrder, string);
val->SetString(string);
return val.forget();
@@ -7050,64 +5977,16 @@ nsComputedDOMStyle::DoGetAnimationTiming
AppendTimingFunction(valueList,
display->mAnimations[i].GetTimingFunction());
} while (++i < display->mAnimationTimingFunctionCount);
return valueList.forget();
}
already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetAnimationDirection()
-{
- const nsStyleDisplay* display = StyleDisplay();
-
- RefPtr<nsDOMCSSValueList> valueList = GetROCSSValueList(true);
-
- MOZ_ASSERT(display->mAnimationDirectionCount > 0,
- "first item must be explicit");
- uint32_t i = 0;
- do {
- const StyleAnimation *animation = &display->mAnimations[i];
- RefPtr<nsROCSSPrimitiveValue> direction = new nsROCSSPrimitiveValue;
- direction->SetIdent(
- nsCSSProps::ValueToKeywordEnum(
- static_cast<int32_t>(animation->GetDirection()),
- nsCSSProps::kAnimationDirectionKTable));
-
- valueList->AppendCSSValue(direction.forget());
- } while (++i < display->mAnimationDirectionCount);
-
- return valueList.forget();
-}
-
-already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetAnimationFillMode()
-{
- const nsStyleDisplay* display = StyleDisplay();
-
- RefPtr<nsDOMCSSValueList> valueList = GetROCSSValueList(true);
-
- MOZ_ASSERT(display->mAnimationFillModeCount > 0,
- "first item must be explicit");
- uint32_t i = 0;
- do {
- const StyleAnimation *animation = &display->mAnimations[i];
- RefPtr<nsROCSSPrimitiveValue> fillMode = new nsROCSSPrimitiveValue;
- fillMode->SetIdent(
- nsCSSProps::ValueToKeywordEnum(
- static_cast<int32_t>(animation->GetFillMode()),
- nsCSSProps::kAnimationFillModeKTable));
-
- valueList->AppendCSSValue(fillMode.forget());
- } while (++i < display->mAnimationFillModeCount);
-
- return valueList.forget();
-}
-
-already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetAnimationIterationCount()
{
const nsStyleDisplay* display = StyleDisplay();
RefPtr<nsDOMCSSValueList> valueList = GetROCSSValueList(true);
MOZ_ASSERT(display->mAnimationIterationCountCount > 0,
"first item must be explicit");
@@ -7124,38 +6003,16 @@ nsComputedDOMStyle::DoGetAnimationIterat
}
valueList->AppendCSSValue(iterationCount.forget());
} while (++i < display->mAnimationIterationCountCount);
return valueList.forget();
}
already_AddRefed<CSSValue>
-nsComputedDOMStyle::DoGetAnimationPlayState()
-{
- const nsStyleDisplay* display = StyleDisplay();
-
- RefPtr<nsDOMCSSValueList> valueList = GetROCSSValueList(true);
-
- MOZ_ASSERT(display->mAnimationPlayStateCount > 0,
- "first item must be explicit");
- uint32_t i = 0;
- do {
- const StyleAnimation *animation = &display->mAnimations[i];
- RefPtr<nsROCSSPrimitiveValue> playState = new nsROCSSPrimitiveValue;
- playState->SetIdent(
- nsCSSProps::ValueToKeywordEnum(animation->GetPlayState(),
- nsCSSProps::kAnimationPlayStateKTable));
- valueList->AppendCSSValue(playState.forget());
- } while (++i < display->mAnimationPlayStateCount);
-
- return valueList.forget();
-}
-
-already_AddRefed<CSSValue>
nsComputedDOMStyle::DummyGetter()
{
MOZ_CRASH("DummyGetter is not supposed to be invoked");
}
static void
MarkComputedStyleMapDirty(const char* aPref, void* aData)
{