mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
style: Refactor some enabledness checks.
There are some common checks that could get some easy-to-use aliases. Differential Revision: https://phabricator.services.mozilla.com/D25117
This commit is contained in:
parent
76c0ae565e
commit
bd77cd64b9
4 changed files with 111 additions and 105 deletions
|
@ -17,7 +17,6 @@ use crate::parser::{Parse, ParserContext};
|
||||||
#[cfg(feature = "servo")]
|
#[cfg(feature = "servo")]
|
||||||
use crate::servo::media_queries::MEDIA_FEATURES;
|
use crate::servo::media_queries::MEDIA_FEATURES;
|
||||||
use crate::str::{starts_with_ignore_ascii_case, string_as_ascii_lowercase};
|
use crate::str::{starts_with_ignore_ascii_case, string_as_ascii_lowercase};
|
||||||
use crate::stylesheets::Origin;
|
|
||||||
use crate::values::computed::{self, ToComputedValue};
|
use crate::values::computed::{self, ToComputedValue};
|
||||||
use crate::values::specified::{Integer, Length, Number, Resolution};
|
use crate::values::specified::{Integer, Length, Number, Resolution};
|
||||||
use crate::values::{serialize_atom_identifier, CSSFloat};
|
use crate::values::{serialize_atom_identifier, CSSFloat};
|
||||||
|
@ -290,7 +289,7 @@ impl MediaFeatureExpression {
|
||||||
|
|
||||||
let mut requirements = ParsingRequirements::empty();
|
let mut requirements = ParsingRequirements::empty();
|
||||||
|
|
||||||
if context.chrome_rules_enabled() || context.stylesheet_origin == Origin::UserAgent {
|
if context.in_ua_or_chrome_sheet() {
|
||||||
requirements.insert(ParsingRequirements::CHROME_AND_UA_ONLY);
|
requirements.insert(ParsingRequirements::CHROME_AND_UA_ONLY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -146,10 +146,23 @@ impl<'a> ParserContext<'a> {
|
||||||
error_reporter.report_error(self.url_data, location, error)
|
error_reporter.report_error(self.url_data, location, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Whether we're in a user-agent stylesheet.
|
||||||
|
#[inline]
|
||||||
|
pub fn in_ua_sheet(&self) -> bool {
|
||||||
|
self.stylesheet_origin == Origin::UserAgent
|
||||||
|
}
|
||||||
|
|
||||||
/// Returns whether chrome-only rules should be parsed.
|
/// Returns whether chrome-only rules should be parsed.
|
||||||
|
#[inline]
|
||||||
pub fn chrome_rules_enabled(&self) -> bool {
|
pub fn chrome_rules_enabled(&self) -> bool {
|
||||||
self.url_data.is_chrome() || self.stylesheet_origin == Origin::User
|
self.url_data.is_chrome() || self.stylesheet_origin == Origin::User
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Whether we're in a user-agent stylesheet or chrome rules are enabled.
|
||||||
|
#[inline]
|
||||||
|
pub fn in_ua_or_chrome_sheet(&self) -> bool {
|
||||||
|
self.in_ua_sheet() || self.chrome_rules_enabled()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A trait to abstract parsing of a specified value given a `ParserContext` and
|
/// A trait to abstract parsing of a specified value given a `ParserContext` and
|
||||||
|
|
|
@ -223,8 +223,7 @@ impl SupportsCondition {
|
||||||
#[cfg(feature = "gecko")]
|
#[cfg(feature = "gecko")]
|
||||||
fn eval_moz_bool_pref(name: &CStr, cx: &ParserContext) -> bool {
|
fn eval_moz_bool_pref(name: &CStr, cx: &ParserContext) -> bool {
|
||||||
use crate::gecko_bindings::bindings;
|
use crate::gecko_bindings::bindings;
|
||||||
use crate::stylesheets::Origin;
|
if !cx.in_ua_or_chrome_sheet() {
|
||||||
if cx.stylesheet_origin != Origin::UserAgent && !cx.chrome_rules_enabled() {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
unsafe { bindings::Gecko_GetBoolPrefValue(name.as_ptr()) }
|
unsafe { bindings::Gecko_GetBoolPrefValue(name.as_ptr()) }
|
||||||
|
|
|
@ -21,22 +21,17 @@ use std::fmt::{self, Write};
|
||||||
use style_traits::{CssWriter, KeywordsCollectFn, ParseError};
|
use style_traits::{CssWriter, KeywordsCollectFn, ParseError};
|
||||||
use style_traits::{SpecifiedValueInfo, StyleParseErrorKind, ToCss};
|
use style_traits::{SpecifiedValueInfo, StyleParseErrorKind, ToCss};
|
||||||
|
|
||||||
fn in_ua_or_chrome_sheet(context: &ParserContext) -> bool {
|
|
||||||
use crate::stylesheets::Origin;
|
|
||||||
context.stylesheet_origin == Origin::UserAgent || context.chrome_rules_enabled()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(feature = "gecko")]
|
#[cfg(feature = "gecko")]
|
||||||
fn moz_display_values_enabled(context: &ParserContext) -> bool {
|
fn moz_display_values_enabled(context: &ParserContext) -> bool {
|
||||||
use crate::gecko_bindings::structs;
|
use crate::gecko_bindings::structs;
|
||||||
in_ua_or_chrome_sheet(context) ||
|
context.in_ua_or_chrome_sheet() ||
|
||||||
unsafe { structs::StaticPrefs_sVarCache_layout_css_xul_display_values_content_enabled }
|
unsafe { structs::StaticPrefs_sVarCache_layout_css_xul_display_values_content_enabled }
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "gecko")]
|
#[cfg(feature = "gecko")]
|
||||||
fn moz_box_display_values_enabled(context: &ParserContext) -> bool {
|
fn moz_box_display_values_enabled(context: &ParserContext) -> bool {
|
||||||
use crate::gecko_bindings::structs;
|
use crate::gecko_bindings::structs;
|
||||||
in_ua_or_chrome_sheet(context) ||
|
context.in_ua_or_chrome_sheet() ||
|
||||||
unsafe {
|
unsafe {
|
||||||
structs::StaticPrefs_sVarCache_layout_css_xul_box_display_values_content_enabled
|
structs::StaticPrefs_sVarCache_layout_css_xul_box_display_values_content_enabled
|
||||||
}
|
}
|
||||||
|
@ -988,27 +983,27 @@ pub enum Appearance {
|
||||||
/// A typical dialog button.
|
/// A typical dialog button.
|
||||||
Button,
|
Button,
|
||||||
/// Various arrows that go in buttons
|
/// Various arrows that go in buttons
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
ButtonArrowDown,
|
ButtonArrowDown,
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
ButtonArrowNext,
|
ButtonArrowNext,
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
ButtonArrowPrevious,
|
ButtonArrowPrevious,
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
ButtonArrowUp,
|
ButtonArrowUp,
|
||||||
/// A rectangular button that contains complex content
|
/// A rectangular button that contains complex content
|
||||||
/// like images (e.g. HTML <button> elements)
|
/// like images (e.g. HTML <button> elements)
|
||||||
ButtonBevel,
|
ButtonBevel,
|
||||||
/// The focus outline box inside of a button.
|
/// The focus outline box inside of a button.
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
ButtonFocus,
|
ButtonFocus,
|
||||||
/// The caret of a text area
|
/// The caret of a text area
|
||||||
Caret,
|
Caret,
|
||||||
/// A dual toolbar button (e.g., a Back button with a dropdown)
|
/// A dual toolbar button (e.g., a Back button with a dropdown)
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
Dualbutton,
|
Dualbutton,
|
||||||
/// A groupbox.
|
/// A groupbox.
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
Groupbox,
|
Groupbox,
|
||||||
/// A inner-spin button.
|
/// A inner-spin button.
|
||||||
InnerSpinButton,
|
InnerSpinButton,
|
||||||
|
@ -1017,17 +1012,17 @@ pub enum Appearance {
|
||||||
/// A listbox item.
|
/// A listbox item.
|
||||||
Listitem,
|
Listitem,
|
||||||
/// Menu Bar background
|
/// Menu Bar background
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
Menubar,
|
Menubar,
|
||||||
/// <menu> and <menuitem> appearances
|
/// <menu> and <menuitem> appearances
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
Menuitem,
|
Menuitem,
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
Checkmenuitem,
|
Checkmenuitem,
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
Radiomenuitem,
|
Radiomenuitem,
|
||||||
/// For text on non-iconic menuitems only
|
/// For text on non-iconic menuitems only
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
Menuitemtext,
|
Menuitemtext,
|
||||||
/// A dropdown list.
|
/// A dropdown list.
|
||||||
Menulist,
|
Menulist,
|
||||||
|
@ -1038,28 +1033,28 @@ pub enum Appearance {
|
||||||
/// An editable textfield with a dropdown list (a combobox).
|
/// An editable textfield with a dropdown list (a combobox).
|
||||||
MenulistTextfield,
|
MenulistTextfield,
|
||||||
/// Menu Popup background.
|
/// Menu Popup background.
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
Menupopup,
|
Menupopup,
|
||||||
/// menu checkbox/radio appearances
|
/// menu checkbox/radio appearances
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
Menucheckbox,
|
Menucheckbox,
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
Menuradio,
|
Menuradio,
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
Menuseparator,
|
Menuseparator,
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
Menuarrow,
|
Menuarrow,
|
||||||
/// An image in the menu gutter, like in bookmarks or history.
|
/// An image in the menu gutter, like in bookmarks or history.
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
Menuimage,
|
Menuimage,
|
||||||
/// A horizontal meter bar.
|
/// A horizontal meter bar.
|
||||||
#[parse(aliases = "meterbar")]
|
#[parse(aliases = "meterbar")]
|
||||||
Meter,
|
Meter,
|
||||||
/// The meter bar's meter indicator.
|
/// The meter bar's meter indicator.
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
Meterchunk,
|
Meterchunk,
|
||||||
/// The "arrowed" part of the dropdown button that open up a dropdown list.
|
/// The "arrowed" part of the dropdown button that open up a dropdown list.
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
MozMenulistButton,
|
MozMenulistButton,
|
||||||
/// For HTML's <input type=number>
|
/// For HTML's <input type=number>
|
||||||
NumberInput,
|
NumberInput,
|
||||||
|
@ -1067,7 +1062,7 @@ pub enum Appearance {
|
||||||
#[parse(aliases = "progressbar")]
|
#[parse(aliases = "progressbar")]
|
||||||
ProgressBar,
|
ProgressBar,
|
||||||
/// The progress bar's progress indicator
|
/// The progress bar's progress indicator
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
Progresschunk,
|
Progresschunk,
|
||||||
/// A vertical progress bar.
|
/// A vertical progress bar.
|
||||||
ProgressbarVertical,
|
ProgressbarVertical,
|
||||||
|
@ -1077,25 +1072,25 @@ pub enum Appearance {
|
||||||
Radio,
|
Radio,
|
||||||
/// A generic container that always repaints on state changes. This is a
|
/// A generic container that always repaints on state changes. This is a
|
||||||
/// hack to make XUL checkboxes and radio buttons work.
|
/// hack to make XUL checkboxes and radio buttons work.
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
CheckboxContainer,
|
CheckboxContainer,
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
RadioContainer,
|
RadioContainer,
|
||||||
/// The label part of a checkbox or radio button, used for painting a focus
|
/// The label part of a checkbox or radio button, used for painting a focus
|
||||||
/// outline.
|
/// outline.
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
CheckboxLabel,
|
CheckboxLabel,
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
RadioLabel,
|
RadioLabel,
|
||||||
/// nsRangeFrame and its subparts
|
/// nsRangeFrame and its subparts
|
||||||
Range,
|
Range,
|
||||||
RangeThumb,
|
RangeThumb,
|
||||||
/// The resizer background area in a status bar for the resizer widget in
|
/// The resizer background area in a status bar for the resizer widget in
|
||||||
/// the corner of a window.
|
/// the corner of a window.
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
Resizerpanel,
|
Resizerpanel,
|
||||||
/// The resizer itself.
|
/// The resizer itself.
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
Resizer,
|
Resizer,
|
||||||
/// A slider.
|
/// A slider.
|
||||||
ScaleHorizontal,
|
ScaleHorizontal,
|
||||||
|
@ -1109,26 +1104,26 @@ pub enum Appearance {
|
||||||
/// The ticks for a slider.
|
/// The ticks for a slider.
|
||||||
Scalethumbtick,
|
Scalethumbtick,
|
||||||
/// A scrollbar.
|
/// A scrollbar.
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
Scrollbar,
|
Scrollbar,
|
||||||
/// A small scrollbar.
|
/// A small scrollbar.
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
ScrollbarSmall,
|
ScrollbarSmall,
|
||||||
/// The scrollbar slider
|
/// The scrollbar slider
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
ScrollbarHorizontal,
|
ScrollbarHorizontal,
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
ScrollbarVertical,
|
ScrollbarVertical,
|
||||||
/// A scrollbar button (up/down/left/right).
|
/// A scrollbar button (up/down/left/right).
|
||||||
/// Keep these in order (some code casts these values to `int` in order to
|
/// Keep these in order (some code casts these values to `int` in order to
|
||||||
/// compare them against each other).
|
/// compare them against each other).
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
ScrollbarbuttonUp,
|
ScrollbarbuttonUp,
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
ScrollbarbuttonDown,
|
ScrollbarbuttonDown,
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
ScrollbarbuttonLeft,
|
ScrollbarbuttonLeft,
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
ScrollbarbuttonRight,
|
ScrollbarbuttonRight,
|
||||||
/// The scrollbar thumb.
|
/// The scrollbar thumb.
|
||||||
ScrollbarthumbHorizontal,
|
ScrollbarthumbHorizontal,
|
||||||
|
@ -1137,47 +1132,47 @@ pub enum Appearance {
|
||||||
ScrollbartrackHorizontal,
|
ScrollbartrackHorizontal,
|
||||||
ScrollbartrackVertical,
|
ScrollbartrackVertical,
|
||||||
/// The scroll corner
|
/// The scroll corner
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
Scrollcorner,
|
Scrollcorner,
|
||||||
/// A searchfield.
|
/// A searchfield.
|
||||||
Searchfield,
|
Searchfield,
|
||||||
/// A separator. Can be horizontal or vertical.
|
/// A separator. Can be horizontal or vertical.
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
Separator,
|
Separator,
|
||||||
/// A spin control (up/down control for time/date pickers).
|
/// A spin control (up/down control for time/date pickers).
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
Spinner,
|
Spinner,
|
||||||
/// The up button of a spin control.
|
/// The up button of a spin control.
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
SpinnerUpbutton,
|
SpinnerUpbutton,
|
||||||
/// The down button of a spin control.
|
/// The down button of a spin control.
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
SpinnerDownbutton,
|
SpinnerDownbutton,
|
||||||
/// The textfield of a spin control
|
/// The textfield of a spin control
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
SpinnerTextfield,
|
SpinnerTextfield,
|
||||||
/// A splitter. Can be horizontal or vertical.
|
/// A splitter. Can be horizontal or vertical.
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
Splitter,
|
Splitter,
|
||||||
/// A status bar in a main application window.
|
/// A status bar in a main application window.
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
Statusbar,
|
Statusbar,
|
||||||
/// A single pane of a status bar.
|
/// A single pane of a status bar.
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
Statusbarpanel,
|
Statusbarpanel,
|
||||||
/// A single tab in a tab widget.
|
/// A single tab in a tab widget.
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
Tab,
|
Tab,
|
||||||
/// A single pane (inside the tabpanels container).
|
/// A single pane (inside the tabpanels container).
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
Tabpanel,
|
Tabpanel,
|
||||||
/// The tab panels container.
|
/// The tab panels container.
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
Tabpanels,
|
Tabpanels,
|
||||||
/// The tabs scroll arrows (left/right).
|
/// The tabs scroll arrows (left/right).
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
TabScrollArrowBack,
|
TabScrollArrowBack,
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
TabScrollArrowForward,
|
TabScrollArrowForward,
|
||||||
/// A multi-line text field, e.g. HTML <textarea>.
|
/// A multi-line text field, e.g. HTML <textarea>.
|
||||||
#[parse(aliases = "textfield-multiline")]
|
#[parse(aliases = "textfield-multiline")]
|
||||||
|
@ -1185,119 +1180,119 @@ pub enum Appearance {
|
||||||
/// A single-line text field, e.g. HTML <input type=text>.
|
/// A single-line text field, e.g. HTML <input type=text>.
|
||||||
Textfield,
|
Textfield,
|
||||||
/// A toolbar in an application window.
|
/// A toolbar in an application window.
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
Toolbar,
|
Toolbar,
|
||||||
/// A single toolbar button (with no associated dropdown).
|
/// A single toolbar button (with no associated dropdown).
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
Toolbarbutton,
|
Toolbarbutton,
|
||||||
/// The dropdown portion of a toolbar button
|
/// The dropdown portion of a toolbar button
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
ToolbarbuttonDropdown,
|
ToolbarbuttonDropdown,
|
||||||
/// The gripper for a toolbar.
|
/// The gripper for a toolbar.
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
Toolbargripper,
|
Toolbargripper,
|
||||||
/// The toolbox that contains the toolbars.
|
/// The toolbox that contains the toolbars.
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
Toolbox,
|
Toolbox,
|
||||||
/// A tooltip.
|
/// A tooltip.
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
Tooltip,
|
Tooltip,
|
||||||
/// A listbox or tree widget header
|
/// A listbox or tree widget header
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
Treeheader,
|
Treeheader,
|
||||||
/// An individual header cell
|
/// An individual header cell
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
Treeheadercell,
|
Treeheadercell,
|
||||||
/// The sort arrow for a header.
|
/// The sort arrow for a header.
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
Treeheadersortarrow,
|
Treeheadersortarrow,
|
||||||
/// A tree item.
|
/// A tree item.
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
Treeitem,
|
Treeitem,
|
||||||
/// A tree widget branch line
|
/// A tree widget branch line
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
Treeline,
|
Treeline,
|
||||||
/// A tree widget twisty.
|
/// A tree widget twisty.
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
Treetwisty,
|
Treetwisty,
|
||||||
/// Open tree widget twisty.
|
/// Open tree widget twisty.
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
Treetwistyopen,
|
Treetwistyopen,
|
||||||
/// A tree widget.
|
/// A tree widget.
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
Treeview,
|
Treeview,
|
||||||
/// Window and dialog backgrounds.
|
/// Window and dialog backgrounds.
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
Window,
|
Window,
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
Dialog,
|
Dialog,
|
||||||
|
|
||||||
/// Vista Rebars.
|
/// Vista Rebars.
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
MozWinCommunicationsToolbox,
|
MozWinCommunicationsToolbox,
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
MozWinMediaToolbox,
|
MozWinMediaToolbox,
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
MozWinBrowsertabbarToolbox,
|
MozWinBrowsertabbarToolbox,
|
||||||
/// Vista glass.
|
/// Vista glass.
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
MozWinGlass,
|
MozWinGlass,
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
MozWinBorderlessGlass,
|
MozWinBorderlessGlass,
|
||||||
/// -moz-apperance style used in setting proper glass margins.
|
/// -moz-apperance style used in setting proper glass margins.
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
MozWinExcludeGlass,
|
MozWinExcludeGlass,
|
||||||
|
|
||||||
/// Titlebar elements on the Mac.
|
/// Titlebar elements on the Mac.
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
MozMacFullscreenButton,
|
MozMacFullscreenButton,
|
||||||
/// Mac help button.
|
/// Mac help button.
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
MozMacHelpButton,
|
MozMacHelpButton,
|
||||||
|
|
||||||
/// Windows themed window frame elements.
|
/// Windows themed window frame elements.
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
MozWindowButtonBox,
|
MozWindowButtonBox,
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
MozWindowButtonBoxMaximized,
|
MozWindowButtonBoxMaximized,
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
MozWindowButtonClose,
|
MozWindowButtonClose,
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
MozWindowButtonMaximize,
|
MozWindowButtonMaximize,
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
MozWindowButtonMinimize,
|
MozWindowButtonMinimize,
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
MozWindowButtonRestore,
|
MozWindowButtonRestore,
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
MozWindowFrameBottom,
|
MozWindowFrameBottom,
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
MozWindowFrameLeft,
|
MozWindowFrameLeft,
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
MozWindowFrameRight,
|
MozWindowFrameRight,
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
MozWindowTitlebar,
|
MozWindowTitlebar,
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
MozWindowTitlebarMaximized,
|
MozWindowTitlebarMaximized,
|
||||||
|
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
MozGtkInfoBar,
|
MozGtkInfoBar,
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
MozMacActiveSourceListSelection,
|
MozMacActiveSourceListSelection,
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
MozMacDisclosureButtonClosed,
|
MozMacDisclosureButtonClosed,
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
MozMacDisclosureButtonOpen,
|
MozMacDisclosureButtonOpen,
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
MozMacSourceList,
|
MozMacSourceList,
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
MozMacSourceListSelection,
|
MozMacSourceListSelection,
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
MozMacVibrancyDark,
|
MozMacVibrancyDark,
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
MozMacVibrancyLight,
|
MozMacVibrancyLight,
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
MozMacVibrantTitlebarDark,
|
MozMacVibrantTitlebarDark,
|
||||||
#[parse(condition = "in_ua_or_chrome_sheet")]
|
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||||
MozMacVibrantTitlebarLight,
|
MozMacVibrantTitlebarLight,
|
||||||
|
|
||||||
/// A non-disappearing scrollbar.
|
/// A non-disappearing scrollbar.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue