Backed out 2 changesets (bug 1852084) for causing bug 1853970. CLOSED TREE

Backed out changeset 427a6983a14b (bug 1852084)
Backed out changeset aac846ab41a5 (bug 1852084)
This commit is contained in:
Iulian Moraru 2023-09-21 00:41:39 +03:00
parent 816a713d44
commit 8867443f5d
9 changed files with 8 additions and 41 deletions

View File

@ -48,7 +48,6 @@ module.exports = {
ignoreFunctions: [
"light-dark" /* Used for color-scheme dependent colors */,
"-moz-image-rect" /* Used for cropping images */,
"-moz-themed" /* Used for native widget rendering */,
"add" /* Used in mathml.css */,
],
},

View File

@ -60,7 +60,6 @@
#navigator-toolbox:not(:-moz-lwtheme) {
background-color: ActiveCaption;
background-image: -moz-themed(-moz-window-titlebar);
color: CaptionText;
&:-moz-window-inactive {

View File

@ -175,8 +175,6 @@ bool nsImageRenderer::PrepareImage() {
} else if (mImage->IsGradient()) {
mGradientData = &*mImage->AsGradient();
mPrepareResult = ImgDrawResult::SUCCESS;
} else if (mImage->IsMozThemed()) {
mPrepareResult = ImgDrawResult::SUCCESS;
} else if (mImage->IsElement()) {
dom::Element* paintElement = // may be null
SVGObserverUtils::GetAndObserveBackgroundImage(
@ -204,7 +202,8 @@ bool nsImageRenderer::PrepareImage() {
mPrepareResult = ImgDrawResult::SUCCESS;
} else if (mImage->IsCrossFade()) {
// See bug 546052 - cross-fade implementation still being worked on.
// See bug 546052 - cross-fade implementation still being worked
// on.
mPrepareResult = ImgDrawResult::BAD_IMAGE;
return false;
} else {
@ -282,7 +281,6 @@ CSSSizeOrRatio nsImageRenderer::ComputeIntrinsicSize() {
MOZ_FALLTHROUGH_ASSERT("image-set should be resolved already");
// Bug 546052 cross-fade not yet implemented.
case StyleImage::Tag::CrossFade:
case StyleImage::Tag::MozThemed:
// Per <http://dev.w3.org/csswg/css3-images/#gradients>, gradients have no
// intrinsic dimensions.
case StyleImage::Tag::Gradient:
@ -538,13 +536,6 @@ ImgDrawResult nsImageRenderer::Draw(nsPresContext* aPresContext,
aOpacity);
break;
}
case StyleImage::Tag::MozThemed: {
auto appearance = mImage->AsMozThemed();
mForFrame->PresContext()->Theme()->DrawWidgetBackground(
ctx, mForFrame, appearance, aDest, aDirtyRect,
nsITheme::DrawOverflow::Yes);
break;
}
case StyleImage::Tag::ImageSet:
MOZ_FALLTHROUGH_ASSERT("image-set should be resolved already");
// See bug 546052 - cross-fade implementation still being worked

View File

@ -1,2 +0,0 @@
<!doctype html>
<div style="-moz-default-appearance: checkbox; appearance: auto; width: 30px; height: 30px; box-sizing: border-box"></div>

View File

@ -1,2 +0,0 @@
<!doctype html>
<div style="background-image: -moz-theme(checkbox); width: 30px; height: 30px;"></div>

View File

@ -65,5 +65,3 @@ skip-if(cocoaWidget) skip-if(winWidget) == progress-overflow.html progress-overf
fails-if(Android) skip-if(cocoaWidget) skip-if(winWidget) == progress-overflow-small.html progress-nobar.html
== chrome://reftest/content/native-theme/676387-1.xhtml chrome://reftest/content/native-theme/676387-1-ref.xhtml
== chrome://reftest/content/native-theme/moz-theme.html chrome://reftest/content/native-theme/moz-theme.html

View File

@ -1503,7 +1503,7 @@ bool StyleImage::IsOpaque() const {
return AsGradient()->IsOpaque();
}
if (IsElement() || IsMozThemed()) {
if (IsElement()) {
return false;
}
@ -1536,7 +1536,6 @@ bool StyleImage::IsComplete() const {
return false;
case Tag::Gradient:
case Tag::Element:
case Tag::MozThemed:
return true;
case Tag::Url:
case Tag::Rect: {
@ -1569,7 +1568,6 @@ bool StyleImage::IsSizeAvailable() const {
return false;
case Tag::Gradient:
case Tag::Element:
case Tag::MozThemed:
return true;
case Tag::Url:
case Tag::Rect: {

View File

@ -10,7 +10,6 @@ use crate::color::mix::ColorInterpolationMethod;
use crate::custom_properties;
use crate::values::generics::position::PositionComponent;
use crate::values::generics::Optional;
use crate::values::specified::box_::Appearance;
use crate::values::serialize_atom_identifier;
use crate::Atom;
use crate::Zero;
@ -55,11 +54,6 @@ pub enum GenericImage<G, MozImageRect, ImageUrl, Color, Percentage, Resolution>
/// boxing them there.
CrossFade(Box<GenericCrossFade<Self, Color, Percentage>>),
/// A `-moz-themed-background(<appearance>)`
#[cfg(feature = "gecko")]
#[css(skip)]
MozThemed(Appearance),
/// An `image-set()` function.
ImageSet(#[compute(field_bound)] Box<GenericImageSet<Self, Resolution>>),
}
@ -460,12 +454,6 @@ where
serialize_atom_identifier(selector, dest)?;
dest.write_char(')')
},
#[cfg(feature = "gecko")]
Image::MozThemed(ref appearance) => {
dest.write_str("-moz-themed(")?;
appearance.to_css(dest)?;
dest.write_char(')')
},
Image::ImageSet(ref is) => is.to_css(dest),
Image::CrossFade(ref cf) => cf.to_css(dest),
}

View File

@ -17,14 +17,14 @@ use crate::values::generics::image::{
use crate::values::generics::image::{GradientFlags, PaintWorklet};
use crate::values::generics::position::Position as GenericPosition;
use crate::values::generics::NonNegative;
use crate::values::specified::position::{
HorizontalPositionKeyword, Position, PositionComponent, Side, VerticalPositionKeyword,
};
use crate::values::specified::position::{HorizontalPositionKeyword, VerticalPositionKeyword};
use crate::values::specified::position::{Position, PositionComponent, Side};
use crate::values::specified::url::SpecifiedImageUrl;
use crate::values::specified::{
Angle, AngleOrPercentage, Appearance, Color, Length, LengthPercentage, NonNegativeLength,
NonNegativeLengthPercentage, Number, NumberOrPercentage, Percentage, Resolution,
Angle, AngleOrPercentage, Color, Length, LengthPercentage, NonNegativeLength,
NonNegativeLengthPercentage, Resolution,
};
use crate::values::specified::{Number, NumberOrPercentage, Percentage};
use crate::Atom;
use cssparser::{Delimiter, Parser, Token};
use selectors::parser::SelectorParseErrorKind;
@ -268,8 +268,6 @@ impl Image {
"-moz-image-rect" => Self::Rect(Box::new(MozImageRect::parse_args(context, input, cors_mode)?)),
#[cfg(feature = "gecko")]
"-moz-element" => Self::Element(Self::parse_element(input)?),
#[cfg(feature = "gecko")]
"-moz-themed" if context.chrome_rules_enabled() => Self::MozThemed(Appearance::parse(context, input)?),
_ => return Err(input.new_custom_error(StyleParseErrorKind::UnexpectedFunction(function))),
})
})