mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 613659 - Remove remaining vestiges of -moz-background-inline-policy. r=cam
This commit is contained in:
parent
1cb8248fa4
commit
aea76177e8
@ -2196,12 +2196,13 @@ nsDisplayBackgroundImage::GetOpaqueRegion(nsDisplayListBuilder* aBuilder,
|
||||
|
||||
*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,
|
||||
// which expects frames to be sent to it in content order, not reverse
|
||||
// content order which we'll produce here.
|
||||
// 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())) {
|
||||
const nsStyleBackground::Layer& layer = mBackgroundStyle->mLayers[mLayer];
|
||||
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(bottom, bottom)
|
||||
CSS_KEY(bottom-outside, bottom_outside)
|
||||
CSS_KEY(bounding-box, bounding_box)
|
||||
CSS_KEY(break-all, break_all)
|
||||
CSS_KEY(break-word, break_word)
|
||||
CSS_KEY(brightness, brightness)
|
||||
@ -258,7 +257,6 @@ CSS_KEY(double, double)
|
||||
CSS_KEY(double-struck, double_struck)
|
||||
CSS_KEY(drop-shadow, drop_shadow)
|
||||
CSS_KEY(e-resize, e_resize)
|
||||
CSS_KEY(each-box, each_box)
|
||||
CSS_KEY(ease, ease)
|
||||
CSS_KEY(ease-in, ease_in)
|
||||
CSS_KEY(ease-in-out, ease_in_out)
|
||||
|
@ -274,10 +274,6 @@
|
||||
// 'text-shadow' (see above) and 'box-shadow' (which is like the
|
||||
// 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(
|
||||
-moz-appearance,
|
||||
appearance,
|
||||
@ -537,18 +533,6 @@ CSS_PROP_BACKGROUND(
|
||||
nullptr,
|
||||
CSS_PROP_NO_OFFSET,
|
||||
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(
|
||||
background-blend-mode,
|
||||
background_blend_mode,
|
||||
|
@ -676,13 +676,6 @@ const KTableValue nsCSSProps::kBackgroundAttachmentKTable[] = {
|
||||
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 &&
|
||||
NS_STYLE_BG_CLIP_PADDING == NS_STYLE_BG_ORIGIN_PADDING &&
|
||||
NS_STYLE_BG_CLIP_CONTENT == NS_STYLE_BG_ORIGIN_CONTENT,
|
||||
|
@ -506,7 +506,6 @@ public:
|
||||
static const KTableValue kBackfaceVisibilityKTable[];
|
||||
static const KTableValue kTransformStyleKTable[];
|
||||
static const KTableValue kBackgroundAttachmentKTable[];
|
||||
static const KTableValue kBackgroundInlinePolicyKTable[];
|
||||
static const KTableValue kBackgroundOriginKTable[];
|
||||
static const KTableValue kBackgroundPositionKTable[];
|
||||
static const KTableValue kBackgroundRepeatKTable[];
|
||||
|
@ -2073,16 +2073,6 @@ nsComputedDOMStyle::DoGetBackgroundImage()
|
||||
return valueList;
|
||||
}
|
||||
|
||||
CSSValue*
|
||||
nsComputedDOMStyle::DoGetBackgroundInlinePolicy()
|
||||
{
|
||||
nsROCSSPrimitiveValue *val = new nsROCSSPrimitiveValue;
|
||||
val->SetIdent(nsCSSProps::ValueToKeywordEnum(
|
||||
StyleBackground()->mBackgroundInlinePolicy,
|
||||
nsCSSProps::kBackgroundInlinePolicyKTable));
|
||||
return val;
|
||||
}
|
||||
|
||||
CSSValue*
|
||||
nsComputedDOMStyle::DoGetBackgroundBlendMode()
|
||||
{
|
||||
|
@ -284,7 +284,6 @@ private:
|
||||
mozilla::dom::CSSValue* DoGetBackgroundPosition();
|
||||
mozilla::dom::CSSValue* DoGetBackgroundRepeat();
|
||||
mozilla::dom::CSSValue* DoGetBackgroundClip();
|
||||
mozilla::dom::CSSValue* DoGetBackgroundInlinePolicy();
|
||||
mozilla::dom::CSSValue* DoGetBackgroundBlendMode();
|
||||
mozilla::dom::CSSValue* DoGetBackgroundOrigin();
|
||||
mozilla::dom::CSSValue* DoGetBackgroundSize();
|
||||
|
@ -230,7 +230,6 @@ COMPUTED_STYLE_PROP(z_index, ZIndex)
|
||||
\* ******************************* */
|
||||
|
||||
COMPUTED_STYLE_PROP(appearance, Appearance)
|
||||
COMPUTED_STYLE_PROP(_moz_background_inline_policy, BackgroundInlinePolicy)
|
||||
COMPUTED_STYLE_PROP(binding, Binding)
|
||||
COMPUTED_STYLE_PROP(border_bottom_colors, BorderBottomColors)
|
||||
COMPUTED_STYLE_PROP(border_left_colors, BorderLeftColors)
|
||||
|
@ -6239,14 +6239,6 @@ nsRuleNode::ComputeBackgroundData(void* aStartStruct,
|
||||
uint8_t(NS_STYLE_BG_CLIP_BORDER), parentBG->mClipCount,
|
||||
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]
|
||||
SetBackgroundList(aContext, *aRuleData->ValueForBackgroundBlendMode(),
|
||||
bg->mLayers,
|
||||
|
@ -1971,7 +1971,6 @@ nsStyleBackground::nsStyleBackground()
|
||||
, mSizeCount(1)
|
||||
, mBlendModeCount(1)
|
||||
, mBackgroundColor(NS_RGBA(0, 0, 0, 0))
|
||||
, mBackgroundInlinePolicy(NS_STYLE_BG_INLINE_POLICY_CONTINUOUS)
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsStyleBackground);
|
||||
Layer *onlyLayer = mLayers.AppendElement();
|
||||
@ -1990,7 +1989,6 @@ nsStyleBackground::nsStyleBackground(const nsStyleBackground& aSource)
|
||||
, mBlendModeCount(aSource.mBlendModeCount)
|
||||
, mLayers(aSource.mLayers) // deep copy
|
||||
, mBackgroundColor(aSource.mBackgroundColor)
|
||||
, mBackgroundInlinePolicy(aSource.mBackgroundInlinePolicy)
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsStyleBackground);
|
||||
// If the deep copy of mLayers failed, truncate the counts.
|
||||
@ -2048,9 +2046,7 @@ nsChangeHint nsStyleBackground::CalcDifference(const nsStyleBackground& aOther)
|
||||
}
|
||||
}
|
||||
|
||||
if (hasVisualDifference ||
|
||||
mBackgroundColor != aOther.mBackgroundColor ||
|
||||
mBackgroundInlinePolicy != aOther.mBackgroundInlinePolicy)
|
||||
if (hasVisualDifference || mBackgroundColor != aOther.mBackgroundColor)
|
||||
return NS_STYLE_HINT_VISUAL;
|
||||
|
||||
return NS_STYLE_HINT_NONE;
|
||||
|
@ -539,11 +539,6 @@ struct nsStyleBackground {
|
||||
|
||||
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.
|
||||
bool IsTransparent() const;
|
||||
|
||||
|
@ -648,14 +648,6 @@ var gCSSProperties = {
|
||||
other_values: [ "radio", "menulist" ],
|
||||
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": {
|
||||
domProp: "MozBinding",
|
||||
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%");
|
||||
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
|
||||
// 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");
|
||||
|
Loading…
Reference in New Issue
Block a user