Backed out 5 changesets (bug 1492958) for bc failures in browser/base/content/test/static/browser_parsable_css.js CLOSED TREE

Backed out changeset d7c8793ee054 (bug 1492958)
Backed out changeset e59edfbbd327 (bug 1492958)
Backed out changeset 5e643bc2e17b (bug 1492958)
Backed out changeset 59cf251c1a59 (bug 1492958)
Backed out changeset edc955448df6 (bug 1492958)
This commit is contained in:
Margareta Eliza Balazs 2018-11-12 14:36:43 +02:00
Родитель abcfe1c182
Коммит cccd9d1083
15 изменённых файлов: 41 добавлений и 57 удалений

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

@ -1356,14 +1356,19 @@ exports.CSS_PROPERTIES = {
],
"supports": [],
"values": [
"-moz-all",
"-moz-none",
"-moz-text",
"all",
"auto",
"element",
"elements",
"inherit",
"initial",
"none",
"text",
"toggle",
"tri-state",
"unset"
]
},
@ -2747,14 +2752,19 @@ exports.CSS_PROPERTIES = {
],
"supports": [],
"values": [
"-moz-all",
"-moz-none",
"-moz-text",
"all",
"auto",
"element",
"elements",
"inherit",
"initial",
"none",
"text",
"toggle",
"tri-state",
"unset"
]
},

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

@ -4162,7 +4162,9 @@ nsIFrame::IsSelectable(StyleUserSelect* aSelectStyle) const
while (frame) {
const nsStyleUIReset* userinterface = frame->StyleUIReset();
switch (userinterface->mUserSelect) {
case StyleUserSelect::All: {
case StyleUserSelect::All:
case StyleUserSelect::MozAll:
{
// override the previous values
if (selectStyle != StyleUserSelect::MozText) {
selectStyle = userinterface->mUserSelect;
@ -4186,6 +4188,8 @@ nsIFrame::IsSelectable(StyleUserSelect* aSelectStyle) const
if (selectStyle == StyleUserSelect::Auto ||
selectStyle == StyleUserSelect::MozText) {
selectStyle = StyleUserSelect::Text;
} else if (selectStyle == StyleUserSelect::MozAll) {
selectStyle = StyleUserSelect::All;
}
// If user tries to select all of a non-editable content,
@ -4264,6 +4268,8 @@ nsFrame::HandlePress(nsPresContext* aPresContext,
return NS_OK;
}
// When implementing StyleUserSelect::Element, StyleUserSelect::Elements and
// StyleUserSelect::Toggle, need to change this logic
bool useFrameSelection = (selectStyle == StyleUserSelect::Text);
// If the mouse is dragged outside the nearest enclosing scrollable area

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

@ -396,7 +396,6 @@ cbindgen-types = [
{ gecko = "StylePathCommand", servo = "values::specified::svg_path::PathCommand" },
{ gecko = "StyleUnicodeRange", servo = "cssparser::UnicodeRange" },
{ gecko = "StyleOverflowWrap", servo = "values::computed::OverflowWrap" },
{ gecko = "StyleUserSelect", servo = "values::computed::UserSelect" },
]
mapped-generic-types = [

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

@ -110,7 +110,6 @@ SERIALIZED_PREDEFINED_TYPES = [
"Translate",
"TimingFunction",
"TransformStyle",
"UserSelect",
"background::BackgroundSize",
"basic_shape::ClippingShape",
"basic_shape::FloatAreaShape",

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

@ -223,6 +223,20 @@ enum class StyleUserFocus : uint8_t {
SelectMenu,
};
// user-select
enum class StyleUserSelect : uint8_t {
None,
Text,
Element,
Elements,
All,
Toggle,
TriState,
Auto, // internal value - please use nsFrame::IsSelectable()
MozAll, // force selection of all children, unless an ancestor has NONE set - bug 48096
MozText, // Like TEXT, except that it won't get overridden by ancestors having ALL.
};
// user-input
enum class StyleUserInput : uint8_t {
None,

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

@ -2625,7 +2625,7 @@ var gCSSProperties = {
inherited: false,
type: CSS_TYPE_LONGHAND,
initial_values: [ "auto" ],
other_values: [ "none", "text", "all", "-moz-none" ],
other_values: [ "none", "text", "element", "elements", "all", "toggle", "tri-state", "-moz-all", "-moz-none" ],
invalid_values: []
},
"background": {

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

@ -110,9 +110,6 @@ const NON_CONTENT_ACCESSIBLE_VALUES = {
"-moz-mac-vibrant-titlebar-dark",
"-moz-mac-vibrant-titlebar-light",
],
"-moz-user-select": [
"-moz-text",
],
};
if (!SpecialPowers.getBoolPref("layout.css.xul-box-display-values.content.enabled")) {

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

@ -53,6 +53,5 @@ include = [
"TimingFunction",
"PathCommand",
"UnicodeRange",
"UserSelect",
]
item_types = ["enums", "structs", "typedefs"]

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

@ -336,7 +336,6 @@ class Longhand(object):
"TextEmphasisPosition",
"TouchAction",
"TransformStyle",
"UserSelect",
"XSpan",
"XTextZoom",
"ZIndex",

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

@ -1429,7 +1429,6 @@ impl Clone for ${style_struct.gecko_struct_name} {
"SVGWidth": impl_svg_length,
"Transform": impl_transform,
"TransformOrigin": impl_transform_origin,
"UserSelect": impl_simple,
"url::UrlOrNone": impl_css_url,
}

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

@ -31,13 +31,15 @@ ${helpers.single_keyword(
spec="https://drafts.csswg.org/css-scrollbars-1/#scrollbar-width"
)}
${helpers.predefined_type(
${helpers.single_keyword(
"-moz-user-select",
"UserSelect",
"computed::UserSelect::Auto",
"auto text none all element elements toggle tri-state -moz-all -moz-text",
products="gecko",
gecko_ffi_name="mUserSelect",
alias="-webkit-user-select",
gecko_ffi_name="mUserSelect",
gecko_enum_prefix="StyleUserSelect",
gecko_strip_moz_prefix=False,
aliases="-moz-none=none",
animation_value_type="discrete",
spec="https://drafts.csswg.org/css-ui-4/#propdef-user-select",
)}

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

@ -84,7 +84,7 @@ pub use self::transform::{Rotate, Scale, Transform, TransformOperation};
pub use self::transform::{TransformOrigin, TransformStyle, Translate};
#[cfg(feature = "gecko")]
pub use self::ui::CursorImage;
pub use self::ui::{ColorOrAuto, Cursor, MozForceBrokenImageIcon, UserSelect};
pub use self::ui::{ColorOrAuto, Cursor, MozForceBrokenImageIcon};
pub use super::specified::{BorderStyle, TextDecorationLine};
pub use super::{Auto, Either, None_};
pub use app_units::Au;

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

@ -10,7 +10,7 @@ use crate::values::computed::Number;
use crate::values::generics::ui as generics;
use crate::values::{Auto, Either};
pub use crate::values::specified::ui::{MozForceBrokenImageIcon, UserSelect};
pub use crate::values::specified::ui::MozForceBrokenImageIcon;
/// auto | <color>
pub type ColorOrAuto = Either<Color, Auto>;

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

@ -82,7 +82,7 @@ pub use self::transform::{Rotate, Scale, Transform};
pub use self::transform::{TransformOrigin, TransformStyle, Translate};
#[cfg(feature = "gecko")]
pub use self::ui::CursorImage;
pub use self::ui::{ColorOrAuto, Cursor, MozForceBrokenImageIcon, UserSelect};
pub use self::ui::{ColorOrAuto, Cursor, MozForceBrokenImageIcon};
pub use super::generics::grid::GridTemplateComponent as GenericGridTemplateComponent;
#[cfg(feature = "gecko")]

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

@ -140,43 +140,3 @@ impl Parse for ScrollbarColor {
})
}
}
fn in_ua_sheet(context: &ParserContext) -> bool {
use crate::stylesheets::Origin;
context.stylesheet_origin == Origin::UserAgent
}
/// The specified value for the `user-select` property.
///
/// https://drafts.csswg.org/css-ui-4/#propdef-user-select
#[allow(missing_docs)]
#[derive(
Clone,
Copy,
Debug,
Eq,
MallocSizeOf,
Parse,
PartialEq,
SpecifiedValueInfo,
ToComputedValue,
ToCss,
)]
#[repr(u8)]
pub enum UserSelect {
Auto,
Text,
#[parse(aliases = "-moz-none")]
None,
/// Force selection of all children, unless an ancestor has `none` set.
All,
/// Like `text`, except that it won't get overridden by ancestors having
/// `all`.
///
/// FIXME(emilio): This only has one use in contenteditable.css, can we find
/// a better way to do this?
///
/// See bug 1181130.
#[parse(condition = "in_ua_sheet")]
MozText,
}