Bug 613659 - Remove remaining vestiges of -moz-background-inline-policy. r=cam

This commit is contained in:
Mats Palmgren 2014-04-17 12:11:08 +00:00
Родитель d7d26fc9a6
Коммит 0ebadaa7d1
13 изменённых файлов: 4 добавлений и 70 удалений

Просмотреть файл

@ -2182,12 +2182,13 @@ nsDisplayBackgroundImage::GetOpaqueRegion(nsDisplayListBuilder* aBuilder,
*aSnap = true; *aSnap = true;
// For policies other than EACH_BOX, don't try to optimize here, since // For NS_STYLE_BOX_DECORATION_BREAK_SLICE, don't try to optimize here, since
// this could easily lead to O(N^2) behavior inside InlineBackgroundData, // this could easily lead to O(N^2) behavior inside InlineBackgroundData,
// which expects frames to be sent to it in content order, not reverse // which expects frames to be sent to it in content order, not reverse
// content order which we'll produce here. // content order which we'll produce here.
// Of course, if there's only one frame in the flow, it doesn't matter. // Of course, if there's only one frame in the flow, it doesn't matter.
if (mBackgroundStyle->mBackgroundInlinePolicy == NS_STYLE_BG_INLINE_POLICY_EACH_BOX || if (mFrame->StyleBorder()->mBoxDecorationBreak ==
NS_STYLE_BOX_DECORATION_BREAK_CLONE ||
(!mFrame->GetPrevContinuation() && !mFrame->GetNextContinuation())) { (!mFrame->GetPrevContinuation() && !mFrame->GetNextContinuation())) {
const nsStyleBackground::Layer& layer = mBackgroundStyle->mLayers[mLayer]; const nsStyleBackground::Layer& layer = mBackgroundStyle->mLayers[mLayer];
if (layer.mImage.IsOpaque() && layer.mBlendMode == NS_STYLE_BLEND_NORMAL) { if (layer.mImage.IsOpaque() && layer.mBlendMode == NS_STYLE_BLEND_NORMAL) {

Просмотреть файл

@ -188,7 +188,6 @@ CSS_KEY(border-box, border_box)
CSS_KEY(both, both) CSS_KEY(both, both)
CSS_KEY(bottom, bottom) CSS_KEY(bottom, bottom)
CSS_KEY(bottom-outside, bottom_outside) CSS_KEY(bottom-outside, bottom_outside)
CSS_KEY(bounding-box, bounding_box)
CSS_KEY(break-all, break_all) CSS_KEY(break-all, break_all)
CSS_KEY(break-word, break_word) CSS_KEY(break-word, break_word)
CSS_KEY(brightness, brightness) CSS_KEY(brightness, brightness)
@ -258,7 +257,6 @@ CSS_KEY(double, double)
CSS_KEY(double-struck, double_struck) CSS_KEY(double-struck, double_struck)
CSS_KEY(drop-shadow, drop_shadow) CSS_KEY(drop-shadow, drop_shadow)
CSS_KEY(e-resize, e_resize) CSS_KEY(e-resize, e_resize)
CSS_KEY(each-box, each_box)
CSS_KEY(ease, ease) CSS_KEY(ease, ease)
CSS_KEY(ease-in, ease_in) CSS_KEY(ease-in, ease_in)
CSS_KEY(ease-in-out, ease_in_out) CSS_KEY(ease-in-out, ease_in_out)

Просмотреть файл

@ -274,10 +274,6 @@
// 'text-shadow' (see above) and 'box-shadow' (which is like the // 'text-shadow' (see above) and 'box-shadow' (which is like the
// border properties). // border properties).
// We include '-moz-background-inline-policy' (css3-background's
// 'background-break') in both as a background property, although this
// is somewhat questionable.
CSS_PROP_DISPLAY( CSS_PROP_DISPLAY(
-moz-appearance, -moz-appearance,
appearance, appearance,
@ -537,18 +533,6 @@ CSS_PROP_BACKGROUND(
nullptr, nullptr,
CSS_PROP_NO_OFFSET, CSS_PROP_NO_OFFSET,
eStyleAnimType_None) eStyleAnimType_None)
CSS_PROP_BACKGROUND(
-moz-background-inline-policy,
_moz_background_inline_policy,
CSS_PROP_DOMPROP_PREFIXED(BackgroundInlinePolicy),
CSS_PROPERTY_PARSE_VALUE |
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE |
CSS_PROPERTY_APPLIES_TO_PLACEHOLDER,
"",
VARIANT_HK,
kBackgroundInlinePolicyKTable,
CSS_PROP_NO_OFFSET,
eStyleAnimType_None)
CSS_PROP_BACKGROUND( CSS_PROP_BACKGROUND(
background-blend-mode, background-blend-mode,
background_blend_mode, background_blend_mode,

Просмотреть файл

@ -676,13 +676,6 @@ const KTableValue nsCSSProps::kBackgroundAttachmentKTable[] = {
eCSSKeyword_UNKNOWN,-1 eCSSKeyword_UNKNOWN,-1
}; };
const KTableValue nsCSSProps::kBackgroundInlinePolicyKTable[] = {
eCSSKeyword_each_box, NS_STYLE_BG_INLINE_POLICY_EACH_BOX,
eCSSKeyword_continuous, NS_STYLE_BG_INLINE_POLICY_CONTINUOUS,
eCSSKeyword_bounding_box, NS_STYLE_BG_INLINE_POLICY_BOUNDING_BOX,
eCSSKeyword_UNKNOWN,-1
};
static_assert(NS_STYLE_BG_CLIP_BORDER == NS_STYLE_BG_ORIGIN_BORDER && static_assert(NS_STYLE_BG_CLIP_BORDER == NS_STYLE_BG_ORIGIN_BORDER &&
NS_STYLE_BG_CLIP_PADDING == NS_STYLE_BG_ORIGIN_PADDING && NS_STYLE_BG_CLIP_PADDING == NS_STYLE_BG_ORIGIN_PADDING &&
NS_STYLE_BG_CLIP_CONTENT == NS_STYLE_BG_ORIGIN_CONTENT, NS_STYLE_BG_CLIP_CONTENT == NS_STYLE_BG_ORIGIN_CONTENT,

Просмотреть файл

@ -506,7 +506,6 @@ public:
static const KTableValue kBackfaceVisibilityKTable[]; static const KTableValue kBackfaceVisibilityKTable[];
static const KTableValue kTransformStyleKTable[]; static const KTableValue kTransformStyleKTable[];
static const KTableValue kBackgroundAttachmentKTable[]; static const KTableValue kBackgroundAttachmentKTable[];
static const KTableValue kBackgroundInlinePolicyKTable[];
static const KTableValue kBackgroundOriginKTable[]; static const KTableValue kBackgroundOriginKTable[];
static const KTableValue kBackgroundPositionKTable[]; static const KTableValue kBackgroundPositionKTable[];
static const KTableValue kBackgroundRepeatKTable[]; static const KTableValue kBackgroundRepeatKTable[];

Просмотреть файл

@ -2073,16 +2073,6 @@ nsComputedDOMStyle::DoGetBackgroundImage()
return valueList; return valueList;
} }
CSSValue*
nsComputedDOMStyle::DoGetBackgroundInlinePolicy()
{
nsROCSSPrimitiveValue *val = new nsROCSSPrimitiveValue;
val->SetIdent(nsCSSProps::ValueToKeywordEnum(
StyleBackground()->mBackgroundInlinePolicy,
nsCSSProps::kBackgroundInlinePolicyKTable));
return val;
}
CSSValue* CSSValue*
nsComputedDOMStyle::DoGetBackgroundBlendMode() nsComputedDOMStyle::DoGetBackgroundBlendMode()
{ {

Просмотреть файл

@ -284,7 +284,6 @@ private:
mozilla::dom::CSSValue* DoGetBackgroundPosition(); mozilla::dom::CSSValue* DoGetBackgroundPosition();
mozilla::dom::CSSValue* DoGetBackgroundRepeat(); mozilla::dom::CSSValue* DoGetBackgroundRepeat();
mozilla::dom::CSSValue* DoGetBackgroundClip(); mozilla::dom::CSSValue* DoGetBackgroundClip();
mozilla::dom::CSSValue* DoGetBackgroundInlinePolicy();
mozilla::dom::CSSValue* DoGetBackgroundBlendMode(); mozilla::dom::CSSValue* DoGetBackgroundBlendMode();
mozilla::dom::CSSValue* DoGetBackgroundOrigin(); mozilla::dom::CSSValue* DoGetBackgroundOrigin();
mozilla::dom::CSSValue* DoGetBackgroundSize(); mozilla::dom::CSSValue* DoGetBackgroundSize();

Просмотреть файл

@ -230,7 +230,6 @@ COMPUTED_STYLE_PROP(z_index, ZIndex)
\* ******************************* */ \* ******************************* */
COMPUTED_STYLE_PROP(appearance, Appearance) COMPUTED_STYLE_PROP(appearance, Appearance)
COMPUTED_STYLE_PROP(_moz_background_inline_policy, BackgroundInlinePolicy)
COMPUTED_STYLE_PROP(binding, Binding) COMPUTED_STYLE_PROP(binding, Binding)
COMPUTED_STYLE_PROP(border_bottom_colors, BorderBottomColors) COMPUTED_STYLE_PROP(border_bottom_colors, BorderBottomColors)
COMPUTED_STYLE_PROP(border_left_colors, BorderLeftColors) COMPUTED_STYLE_PROP(border_left_colors, BorderLeftColors)

Просмотреть файл

@ -6239,14 +6239,6 @@ nsRuleNode::ComputeBackgroundData(void* aStartStruct,
uint8_t(NS_STYLE_BG_CLIP_BORDER), parentBG->mClipCount, uint8_t(NS_STYLE_BG_CLIP_BORDER), parentBG->mClipCount,
bg->mClipCount, maxItemCount, rebuild, canStoreInRuleTree); bg->mClipCount, maxItemCount, rebuild, canStoreInRuleTree);
// background-inline-policy: enum, inherit, initial
SetDiscrete(*aRuleData->ValueForBackgroundInlinePolicy(),
bg->mBackgroundInlinePolicy,
canStoreInRuleTree,
SETDSC_ENUMERATED | SETDSC_UNSET_INITIAL,
parentBG->mBackgroundInlinePolicy,
NS_STYLE_BG_INLINE_POLICY_CONTINUOUS, 0, 0, 0, 0);
// background-blend-mode: enum, inherit, initial [list] // background-blend-mode: enum, inherit, initial [list]
SetBackgroundList(aContext, *aRuleData->ValueForBackgroundBlendMode(), SetBackgroundList(aContext, *aRuleData->ValueForBackgroundBlendMode(),
bg->mLayers, bg->mLayers,

Просмотреть файл

@ -1971,7 +1971,6 @@ nsStyleBackground::nsStyleBackground()
, mSizeCount(1) , mSizeCount(1)
, mBlendModeCount(1) , mBlendModeCount(1)
, mBackgroundColor(NS_RGBA(0, 0, 0, 0)) , mBackgroundColor(NS_RGBA(0, 0, 0, 0))
, mBackgroundInlinePolicy(NS_STYLE_BG_INLINE_POLICY_CONTINUOUS)
{ {
MOZ_COUNT_CTOR(nsStyleBackground); MOZ_COUNT_CTOR(nsStyleBackground);
Layer *onlyLayer = mLayers.AppendElement(); Layer *onlyLayer = mLayers.AppendElement();
@ -1990,7 +1989,6 @@ nsStyleBackground::nsStyleBackground(const nsStyleBackground& aSource)
, mBlendModeCount(aSource.mBlendModeCount) , mBlendModeCount(aSource.mBlendModeCount)
, mLayers(aSource.mLayers) // deep copy , mLayers(aSource.mLayers) // deep copy
, mBackgroundColor(aSource.mBackgroundColor) , mBackgroundColor(aSource.mBackgroundColor)
, mBackgroundInlinePolicy(aSource.mBackgroundInlinePolicy)
{ {
MOZ_COUNT_CTOR(nsStyleBackground); MOZ_COUNT_CTOR(nsStyleBackground);
// If the deep copy of mLayers failed, truncate the counts. // If the deep copy of mLayers failed, truncate the counts.
@ -2048,9 +2046,7 @@ nsChangeHint nsStyleBackground::CalcDifference(const nsStyleBackground& aOther)
} }
} }
if (hasVisualDifference || if (hasVisualDifference || mBackgroundColor != aOther.mBackgroundColor)
mBackgroundColor != aOther.mBackgroundColor ||
mBackgroundInlinePolicy != aOther.mBackgroundInlinePolicy)
return NS_STYLE_HINT_VISUAL; return NS_STYLE_HINT_VISUAL;
return NS_STYLE_HINT_NONE; return NS_STYLE_HINT_NONE;

Просмотреть файл

@ -539,11 +539,6 @@ struct nsStyleBackground {
nscolor mBackgroundColor; // [reset] nscolor mBackgroundColor; // [reset]
// FIXME: This (now background-break in css3-background) should
// probably move into a different struct so that everything in
// nsStyleBackground is set by the background shorthand.
uint8_t mBackgroundInlinePolicy; // [reset] See nsStyleConsts.h
// True if this background is completely transparent. // True if this background is completely transparent.
bool IsTransparent() const; bool IsTransparent() const;

Просмотреть файл

@ -648,14 +648,6 @@ var gCSSProperties = {
other_values: [ "radio", "menulist" ], other_values: [ "radio", "menulist" ],
invalid_values: [] invalid_values: []
}, },
"-moz-background-inline-policy": {
domProp: "MozBackgroundInlinePolicy",
inherited: false,
type: CSS_TYPE_LONGHAND,
initial_values: [ "continuous" ],
other_values: ["bounding-box", "each-box" ],
invalid_values: []
},
"-moz-binding": { "-moz-binding": {
domProp: "MozBinding", domProp: "MozBinding",
inherited: false, inherited: false,

Просмотреть файл

@ -139,10 +139,6 @@ isnot(e.style.background, "", "should have background shorthand (size:100% auto)
e.setAttribute("style", "background: red; background-size: auto 100%"); e.setAttribute("style", "background: red; background-size: auto 100%");
isnot(e.style.background, "", "should have background shorthand (size:auto 100%)"); isnot(e.style.background, "", "should have background shorthand (size:auto 100%)");
// Test background-inline-policy not interacting with the background shorthand.
e.setAttribute("style", "background: red; -moz-background-inline-policy: each-box");
isnot(e.style.background, "", "should have background shorthand (-moz-background-inline-policy not relevant)");
// Check that we only serialize background when the lists (of layers) for // Check that we only serialize background when the lists (of layers) for
// the subproperties are the same length. // the subproperties are the same length.
e.setAttribute("style", "background-clip: border-box, padding-box, border-box; background-origin: border-box, padding-box, padding-box; background-size: cover, auto, contain; background-color: blue; background-image: url(404.png), none, url(404-2.png); background-attachment: fixed, scroll, scroll; background-position: top left, center, 30px 50px; background-repeat: repeat-x, repeat, no-repeat"); e.setAttribute("style", "background-clip: border-box, padding-box, border-box; background-origin: border-box, padding-box, padding-box; background-size: cover, auto, contain; background-color: blue; background-image: url(404.png), none, url(404-2.png); background-attachment: fixed, scroll, scroll; background-position: top left, center, 30px 50px; background-repeat: repeat-x, repeat, no-repeat");