mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 02:14:43 +00:00
Backed out changeset 8fac157c354a (bug 1741973) for causing xpc failures in devtools/shared/tests/xpcshell/test_css-properties-db. CLOSED TREE
This commit is contained in:
parent
3be9f0e037
commit
0d095a62b5
@ -2993,7 +2993,6 @@ exports.CSS_PROPERTIES = {
|
||||
"outline-width",
|
||||
"outline-offset",
|
||||
"size",
|
||||
"page",
|
||||
"padding-top",
|
||||
"padding-right",
|
||||
"padding-bottom",
|
||||
@ -8909,20 +8908,6 @@ exports.CSS_PROPERTIES = {
|
||||
"unset"
|
||||
]
|
||||
},
|
||||
"page": {
|
||||
"isInherited": false,
|
||||
"subproperties": [
|
||||
"page"
|
||||
],
|
||||
"supports": [],
|
||||
"values": [
|
||||
"auto",
|
||||
"inherit",
|
||||
"initial",
|
||||
"revert",
|
||||
"unset"
|
||||
]
|
||||
},
|
||||
"page-break-after": {
|
||||
"isInherited": false,
|
||||
"subproperties": [
|
||||
@ -11108,10 +11093,6 @@ exports.PREFERENCES = [
|
||||
"offset-path",
|
||||
"layout.css.motion-path.enabled"
|
||||
],
|
||||
[
|
||||
"page",
|
||||
"layout.css.named-pages.enabled"
|
||||
],
|
||||
[
|
||||
"rotate",
|
||||
"layout.css.individual-transform.enabled"
|
||||
|
@ -583,7 +583,6 @@ cbindgen-types = [
|
||||
{ gecko = "StyleFontSizeKeyword", servo = "crate::values::specified::font::FontSizeKeyword" },
|
||||
{ gecko = "StyleDefaultFontSizes", servo = "crate::gecko::wrapper::DefaultFontSizes" },
|
||||
{ gecko = "StyleCaptionSide", servo = "crate::values::computed::table::CaptionSide" },
|
||||
{ gecko = "StylePageName", servo = "crate::values::specified::page::PageName" },
|
||||
{ gecko = "StylePageSize", servo = "crate::values::computed::page::PageSize" },
|
||||
{ gecko = "StyleDProperty", servo = "crate::values::specified::svg::DProperty" },
|
||||
{ gecko = "StyleImageRendering", servo = "crate::values::computed::ImageRendering" },
|
||||
|
@ -1040,7 +1040,7 @@ bool nsStyleSVGReset::HasMask() const {
|
||||
|
||||
nsChangeHint nsStylePage::CalcDifference(const nsStylePage& aNewData) const {
|
||||
// Page rule styling only matters when printing or using print preview.
|
||||
if (aNewData.mSize != mSize || aNewData.mPage != mPage) {
|
||||
if (aNewData.mSize != mSize) {
|
||||
return nsChangeHint_NeutralChange;
|
||||
}
|
||||
return nsChangeHint_Empty;
|
||||
|
@ -689,19 +689,16 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleList {
|
||||
|
||||
struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStylePage {
|
||||
using StylePageSize = mozilla::StylePageSize;
|
||||
using StylePageName = mozilla::StylePageName;
|
||||
nsStylePage(const nsStylePage& aOther) = default;
|
||||
nsStylePage& operator=(const nsStylePage& aOther) = default;
|
||||
explicit nsStylePage(const mozilla::dom::Document&)
|
||||
: mSize(StylePageSize::Auto()), mPage(StylePageName::Auto()) {}
|
||||
: mSize(StylePageSize::Auto()) {}
|
||||
|
||||
static constexpr bool kHasTriggerImageLoads = false;
|
||||
nsChangeHint CalcDifference(const nsStylePage& aNewData) const;
|
||||
|
||||
// page-size property.
|
||||
StylePageSize mSize;
|
||||
// page-name property.
|
||||
StylePageName mPage;
|
||||
};
|
||||
|
||||
struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStylePosition {
|
||||
|
@ -11900,17 +11900,6 @@ if (IsCSSPropertyPrefEnabled("layout.css.touch_action.enabled")) {
|
||||
};
|
||||
}
|
||||
|
||||
if (IsCSSPropertyPrefEnabled("layout.css.named-pages.enabled")) {
|
||||
gCSSProperties["page"] = {
|
||||
domProp: "page",
|
||||
inherited: false,
|
||||
type: CSS_TYPE_LONGHAND,
|
||||
initial_values: ["auto"],
|
||||
other_values: ["page", "small_page", "large_page", "A4"],
|
||||
invalid_values: ["page1 page2", "auto page", "1cm"],
|
||||
};
|
||||
}
|
||||
|
||||
gCSSProperties["text-justify"] = {
|
||||
domProp: "textJustify",
|
||||
inherited: true,
|
||||
|
@ -7369,13 +7369,6 @@
|
||||
mirror: always
|
||||
rust: true
|
||||
|
||||
# Enables support for the named pages
|
||||
- name: layout.css.named-pages.enabled
|
||||
type: RelaxedAtomicBool
|
||||
value: false
|
||||
mirror: always
|
||||
rust: true
|
||||
|
||||
# Dictates whether or not the prefers contrast media query will be
|
||||
# usable.
|
||||
# true: prefers-contrast will toggle based on OS and browser settings.
|
||||
|
@ -38,6 +38,7 @@ COUNTED_UNKNOWN_PROPERTIES = [
|
||||
"-webkit-writing-mode",
|
||||
"baseline-shift",
|
||||
"-webkit-hyphenate-character",
|
||||
"page",
|
||||
"-webkit-highlight",
|
||||
"background-repeat-x",
|
||||
"-webkit-padding-end",
|
||||
|
@ -19,13 +19,3 @@ ${helpers.predefined_type(
|
||||
animation_value_type="none",
|
||||
rule_types_allowed=PAGE_RULE,
|
||||
)}
|
||||
|
||||
${helpers.predefined_type(
|
||||
"page",
|
||||
"PageName",
|
||||
"computed::PageName::auto()",
|
||||
engines="gecko",
|
||||
gecko_pref="layout.css.named-pages.enabled",
|
||||
spec="https://drafts.csswg.org/css-page-3/#using-named-pages",
|
||||
animation_value_type="discrete",
|
||||
)}
|
||||
|
@ -70,7 +70,7 @@ pub use self::list::ListStyleType;
|
||||
pub use self::list::Quotes;
|
||||
pub use self::motion::{OffsetPath, OffsetRotate};
|
||||
pub use self::outline::OutlineStyle;
|
||||
pub use self::page::{Orientation, PageName, PageSize, PaperSize};
|
||||
pub use self::page::{Orientation, PageSize, PaperSize};
|
||||
pub use self::percentage::{NonNegativePercentage, Percentage};
|
||||
pub use self::position::AspectRatio;
|
||||
pub use self::position::{
|
||||
|
@ -2,7 +2,7 @@
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
//! Computed @page at-rule properties and named-page style properties
|
||||
//! Computed @page at-rule properties
|
||||
|
||||
use crate::values::computed::length::NonNegativeLength;
|
||||
use crate::values::computed::{Context, ToComputedValue};
|
||||
@ -13,7 +13,6 @@ use crate::values::specified::page as specified;
|
||||
pub use generics::page::GenericPageSize;
|
||||
pub use generics::page::Orientation;
|
||||
pub use generics::page::PaperSize;
|
||||
pub use specified::PageName;
|
||||
|
||||
/// Computed value of the @page size descriptor
|
||||
///
|
||||
|
@ -69,7 +69,7 @@ pub use self::list::ListStyleType;
|
||||
pub use self::list::Quotes;
|
||||
pub use self::motion::{OffsetPath, OffsetRotate};
|
||||
pub use self::outline::OutlineStyle;
|
||||
pub use self::page::{Orientation, PageName, PageSize, PaperSize};
|
||||
pub use self::page::{Orientation, PageSize, PaperSize};
|
||||
pub use self::percentage::{NonNegativePercentage, Percentage};
|
||||
pub use self::position::AspectRatio;
|
||||
pub use self::position::{
|
||||
|
@ -2,10 +2,10 @@
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
//! Specified @page at-rule properties and named-page style properties
|
||||
//! Specified @page at-rule properties
|
||||
|
||||
use crate::parser::{Parse, ParserContext};
|
||||
use crate::values::{generics, CustomIdent};
|
||||
use crate::values::generics;
|
||||
use crate::values::generics::size::Size2D;
|
||||
use crate::values::specified::length::NonNegativeLength;
|
||||
use cssparser::Parser;
|
||||
@ -46,43 +46,3 @@ impl Parse for PageSize {
|
||||
Ok(PageSize::Auto)
|
||||
}
|
||||
}
|
||||
|
||||
/// Page name value.
|
||||
///
|
||||
/// https://drafts.csswg.org/css-page-3/#using-named-pages
|
||||
#[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToCss, ToComputedValue, ToResolvedValue, ToShmem)]
|
||||
#[repr(C, u8)]
|
||||
pub enum PageName {
|
||||
/// `auto` value.
|
||||
Auto,
|
||||
/// Page name value
|
||||
PageName(CustomIdent),
|
||||
}
|
||||
|
||||
impl Parse for PageName {
|
||||
fn parse<'i, 't>(
|
||||
_context: &ParserContext,
|
||||
input: &mut Parser<'i, 't>,
|
||||
) -> Result<Self, ParseError<'i>> {
|
||||
let location = input.current_source_location();
|
||||
let ident = input.expect_ident()?;
|
||||
Ok(match_ignore_ascii_case! { ident,
|
||||
"auto" => PageName::auto(),
|
||||
_ => PageName::PageName(CustomIdent::from_ident(location, ident, &[])?),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
impl PageName {
|
||||
/// `auto` value.
|
||||
#[inline]
|
||||
pub fn auto() -> Self {
|
||||
PageName::Auto
|
||||
}
|
||||
|
||||
/// Whether this is the `auto` value.
|
||||
#[inline]
|
||||
pub fn is_auto(&self) -> bool {
|
||||
matches!(*self, PageName::Auto)
|
||||
}
|
||||
}
|
||||
|
@ -231,7 +231,6 @@ include = [
|
||||
"AspectRatio",
|
||||
"DefaultFontSizes",
|
||||
"RuleChangeKind",
|
||||
"PageName",
|
||||
"PageSize",
|
||||
"DProperty",
|
||||
"ImageRendering",
|
||||
|
@ -1,3 +1,10 @@
|
||||
[page-rule-declarations-002.html]
|
||||
prefs: [layout.css.named-pages.enabled:true]
|
||||
[e.style['page'\] = "auto" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['page'\] = "large_page" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['page'\] = "small_page" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user