Use Servo data to back @counter-style rule.

This commit is contained in:
Xidorn Quan 2018-04-05 08:43:55 +10:00
parent 32cd0b4ea0
commit 80ab893e3a
12 changed files with 18158 additions and 18132 deletions

View file

@ -8,7 +8,7 @@
#![allow(non_snake_case, missing_docs)]
use gecko_bindings::bindings::{RawServoFontFeatureValuesRule, RawServoImportRule};
use gecko_bindings::bindings::{RawServoCounterStyleRule, RawServoFontFeatureValuesRule, RawServoImportRule};
use gecko_bindings::bindings::{RawServoKeyframe, RawServoKeyframesRule, RawServoSupportsRule};
use gecko_bindings::bindings::{RawServoMediaRule, RawServoNamespaceRule, RawServoPageRule};
use gecko_bindings::bindings::{RawServoRuleNode, RawServoRuleNodeStrong, RawServoDocumentRule};
@ -23,8 +23,9 @@ use rule_tree::StrongRuleNode;
use servo_arc::{Arc, ArcBorrow};
use shared_lock::Locked;
use std::{mem, ptr};
use stylesheets::{CssRules, StylesheetContents, StyleRule, ImportRule, KeyframesRule, MediaRule};
use stylesheets::{FontFaceRule, FontFeatureValuesRule, NamespaceRule, PageRule, SupportsRule, DocumentRule};
use stylesheets::{CssRules, CounterStyleRule, FontFaceRule, FontFeatureValuesRule};
use stylesheets::{ImportRule, KeyframesRule, MediaRule, StylesheetContents, StyleRule};
use stylesheets::{NamespaceRule, PageRule, SupportsRule, DocumentRule};
use stylesheets::keyframes_rule::Keyframe;
macro_rules! impl_arc_ffi {
@ -94,6 +95,9 @@ impl_arc_ffi!(Locked<FontFeatureValuesRule> => RawServoFontFeatureValuesRule
impl_arc_ffi!(Locked<FontFaceRule> => RawServoFontFaceRule
[Servo_FontFaceRule_AddRef, Servo_FontFaceRule_Release]);
impl_arc_ffi!(Locked<CounterStyleRule> => RawServoCounterStyleRule
[Servo_CounterStyleRule_AddRef, Servo_CounterStyleRule_Release]);
// RuleNode is a Arc-like type but it does not use Arc.
impl StrongRuleNode {

View file

@ -90,8 +90,6 @@ cfg_if! {
pub static nsGkAtoms_action: *mut nsStaticAtom;
#[link_name = "_ZN9nsGkAtoms6activeE"]
pub static nsGkAtoms_active: *mut nsStaticAtom;
#[link_name = "_ZN9nsGkAtoms19activetitlebarcolorE"]
pub static nsGkAtoms_activetitlebarcolor: *mut nsStaticAtom;
#[link_name = "_ZN9nsGkAtoms13activateontabE"]
pub static nsGkAtoms_activateontab: *mut nsStaticAtom;
#[link_name = "_ZN9nsGkAtoms7actuateE"]
@ -1088,8 +1086,6 @@ cfg_if! {
pub static nsGkAtoms_implements: *mut nsStaticAtom;
#[link_name = "_ZN9nsGkAtoms6importE"]
pub static nsGkAtoms_import: *mut nsStaticAtom;
#[link_name = "_ZN9nsGkAtoms21inactivetitlebarcolorE"]
pub static nsGkAtoms_inactivetitlebarcolor: *mut nsStaticAtom;
#[link_name = "_ZN9nsGkAtoms7includeE"]
pub static nsGkAtoms_include: *mut nsStaticAtom;
#[link_name = "_ZN9nsGkAtoms8includesE"]
@ -5128,10 +5124,22 @@ cfg_if! {
pub static nsCSSPseudoElements_placeholder: *mut nsICSSPseudoElement;
#[link_name = "_ZN19nsCSSPseudoElements14mozColorSwatchE"]
pub static nsCSSPseudoElements_mozColorSwatch: *mut nsICSSPseudoElement;
#[link_name = "_ZN14nsCSSAnonBoxes7mozTextE"]
pub static nsCSSAnonBoxes_mozText: *mut nsICSSAnonBoxPseudo;
#[link_name = "_ZN14nsCSSAnonBoxes14oofPlaceholderE"]
pub static nsCSSAnonBoxes_oofPlaceholder: *mut nsICSSAnonBoxPseudo;
#[link_name = "_ZN14nsCSSAnonBoxes24horizontalFramesetBorderE"]
pub static nsCSSAnonBoxes_horizontalFramesetBorder: *mut nsICSSAnonBoxPseudo;
#[link_name = "_ZN14nsCSSAnonBoxes22verticalFramesetBorderE"]
pub static nsCSSAnonBoxes_verticalFramesetBorder: *mut nsICSSAnonBoxPseudo;
#[link_name = "_ZN14nsCSSAnonBoxes13framesetBlankE"]
pub static nsCSSAnonBoxes_framesetBlank: *mut nsICSSAnonBoxPseudo;
#[link_name = "_ZN14nsCSSAnonBoxes13tableColGroupE"]
pub static nsCSSAnonBoxes_tableColGroup: *mut nsICSSAnonBoxPseudo;
#[link_name = "_ZN14nsCSSAnonBoxes8tableColE"]
pub static nsCSSAnonBoxes_tableCol: *mut nsICSSAnonBoxPseudo;
#[link_name = "_ZN14nsCSSAnonBoxes9pageBreakE"]
pub static nsCSSAnonBoxes_pageBreak: *mut nsICSSAnonBoxPseudo;
#[link_name = "_ZN14nsCSSAnonBoxes7mozTextE"]
pub static nsCSSAnonBoxes_mozText: *mut nsICSSAnonBoxPseudo;
#[link_name = "_ZN14nsCSSAnonBoxes23firstLetterContinuationE"]
pub static nsCSSAnonBoxes_firstLetterContinuation: *mut nsICSSAnonBoxPseudo;
#[link_name = "_ZN14nsCSSAnonBoxes27mozBlockInsideInlineWrapperE"]
@ -5140,10 +5148,6 @@ cfg_if! {
pub static nsCSSAnonBoxes_mozMathMLAnonymousBlock: *mut nsICSSAnonBoxPseudo;
#[link_name = "_ZN14nsCSSAnonBoxes20mozXULAnonymousBlockE"]
pub static nsCSSAnonBoxes_mozXULAnonymousBlock: *mut nsICSSAnonBoxPseudo;
#[link_name = "_ZN14nsCSSAnonBoxes24horizontalFramesetBorderE"]
pub static nsCSSAnonBoxes_horizontalFramesetBorder: *mut nsICSSAnonBoxPseudo;
#[link_name = "_ZN14nsCSSAnonBoxes22verticalFramesetBorderE"]
pub static nsCSSAnonBoxes_verticalFramesetBorder: *mut nsICSSAnonBoxPseudo;
#[link_name = "_ZN14nsCSSAnonBoxes12mozLineFrameE"]
pub static nsCSSAnonBoxes_mozLineFrame: *mut nsICSSAnonBoxPseudo;
#[link_name = "_ZN14nsCSSAnonBoxes13buttonContentE"]
@ -5154,8 +5158,6 @@ cfg_if! {
pub static nsCSSAnonBoxes_dropDownList: *mut nsICSSAnonBoxPseudo;
#[link_name = "_ZN14nsCSSAnonBoxes15fieldsetContentE"]
pub static nsCSSAnonBoxes_fieldsetContent: *mut nsICSSAnonBoxPseudo;
#[link_name = "_ZN14nsCSSAnonBoxes13framesetBlankE"]
pub static nsCSSAnonBoxes_framesetBlank: *mut nsICSSAnonBoxPseudo;
#[link_name = "_ZN14nsCSSAnonBoxes30mozDisplayComboboxControlFrameE"]
pub static nsCSSAnonBoxes_mozDisplayComboboxControlFrame: *mut nsICSSAnonBoxPseudo;
#[link_name = "_ZN14nsCSSAnonBoxes17htmlCanvasContentE"]
@ -5166,10 +5168,6 @@ cfg_if! {
pub static nsCSSAnonBoxes_table: *mut nsICSSAnonBoxPseudo;
#[link_name = "_ZN14nsCSSAnonBoxes9tableCellE"]
pub static nsCSSAnonBoxes_tableCell: *mut nsICSSAnonBoxPseudo;
#[link_name = "_ZN14nsCSSAnonBoxes13tableColGroupE"]
pub static nsCSSAnonBoxes_tableColGroup: *mut nsICSSAnonBoxPseudo;
#[link_name = "_ZN14nsCSSAnonBoxes8tableColE"]
pub static nsCSSAnonBoxes_tableCol: *mut nsICSSAnonBoxPseudo;
#[link_name = "_ZN14nsCSSAnonBoxes12tableWrapperE"]
pub static nsCSSAnonBoxes_tableWrapper: *mut nsICSSAnonBoxPseudo;
#[link_name = "_ZN14nsCSSAnonBoxes13tableRowGroupE"]
@ -5178,8 +5176,6 @@ cfg_if! {
pub static nsCSSAnonBoxes_tableRow: *mut nsICSSAnonBoxPseudo;
#[link_name = "_ZN14nsCSSAnonBoxes6canvasE"]
pub static nsCSSAnonBoxes_canvas: *mut nsICSSAnonBoxPseudo;
#[link_name = "_ZN14nsCSSAnonBoxes9pageBreakE"]
pub static nsCSSAnonBoxes_pageBreak: *mut nsICSSAnonBoxPseudo;
#[link_name = "_ZN14nsCSSAnonBoxes4pageE"]
pub static nsCSSAnonBoxes_page: *mut nsICSSAnonBoxPseudo;
#[link_name = "_ZN14nsCSSAnonBoxes11pageContentE"]
@ -5315,8 +5311,6 @@ cfg_if! {
pub static nsGkAtoms_action: *mut nsStaticAtom;
#[link_name = "?active@nsGkAtoms@@2PEAVnsStaticAtom@@EA"]
pub static nsGkAtoms_active: *mut nsStaticAtom;
#[link_name = "?activetitlebarcolor@nsGkAtoms@@2PEAVnsStaticAtom@@EA"]
pub static nsGkAtoms_activetitlebarcolor: *mut nsStaticAtom;
#[link_name = "?activateontab@nsGkAtoms@@2PEAVnsStaticAtom@@EA"]
pub static nsGkAtoms_activateontab: *mut nsStaticAtom;
#[link_name = "?actuate@nsGkAtoms@@2PEAVnsStaticAtom@@EA"]
@ -6313,8 +6307,6 @@ cfg_if! {
pub static nsGkAtoms_implements: *mut nsStaticAtom;
#[link_name = "?import@nsGkAtoms@@2PEAVnsStaticAtom@@EA"]
pub static nsGkAtoms_import: *mut nsStaticAtom;
#[link_name = "?inactivetitlebarcolor@nsGkAtoms@@2PEAVnsStaticAtom@@EA"]
pub static nsGkAtoms_inactivetitlebarcolor: *mut nsStaticAtom;
#[link_name = "?include@nsGkAtoms@@2PEAVnsStaticAtom@@EA"]
pub static nsGkAtoms_include: *mut nsStaticAtom;
#[link_name = "?includes@nsGkAtoms@@2PEAVnsStaticAtom@@EA"]
@ -10353,10 +10345,22 @@ cfg_if! {
pub static nsCSSPseudoElements_placeholder: *mut nsICSSPseudoElement;
#[link_name = "?mozColorSwatch@nsCSSPseudoElements@@2PEAVnsICSSPseudoElement@@EA"]
pub static nsCSSPseudoElements_mozColorSwatch: *mut nsICSSPseudoElement;
#[link_name = "?mozText@nsCSSAnonBoxes@@2PEAVnsICSSAnonBoxPseudo@@EA"]
pub static nsCSSAnonBoxes_mozText: *mut nsICSSAnonBoxPseudo;
#[link_name = "?oofPlaceholder@nsCSSAnonBoxes@@2PEAVnsICSSAnonBoxPseudo@@EA"]
pub static nsCSSAnonBoxes_oofPlaceholder: *mut nsICSSAnonBoxPseudo;
#[link_name = "?horizontalFramesetBorder@nsCSSAnonBoxes@@2PEAVnsICSSAnonBoxPseudo@@EA"]
pub static nsCSSAnonBoxes_horizontalFramesetBorder: *mut nsICSSAnonBoxPseudo;
#[link_name = "?verticalFramesetBorder@nsCSSAnonBoxes@@2PEAVnsICSSAnonBoxPseudo@@EA"]
pub static nsCSSAnonBoxes_verticalFramesetBorder: *mut nsICSSAnonBoxPseudo;
#[link_name = "?framesetBlank@nsCSSAnonBoxes@@2PEAVnsICSSAnonBoxPseudo@@EA"]
pub static nsCSSAnonBoxes_framesetBlank: *mut nsICSSAnonBoxPseudo;
#[link_name = "?tableColGroup@nsCSSAnonBoxes@@2PEAVnsICSSAnonBoxPseudo@@EA"]
pub static nsCSSAnonBoxes_tableColGroup: *mut nsICSSAnonBoxPseudo;
#[link_name = "?tableCol@nsCSSAnonBoxes@@2PEAVnsICSSAnonBoxPseudo@@EA"]
pub static nsCSSAnonBoxes_tableCol: *mut nsICSSAnonBoxPseudo;
#[link_name = "?pageBreak@nsCSSAnonBoxes@@2PEAVnsICSSAnonBoxPseudo@@EA"]
pub static nsCSSAnonBoxes_pageBreak: *mut nsICSSAnonBoxPseudo;
#[link_name = "?mozText@nsCSSAnonBoxes@@2PEAVnsICSSAnonBoxPseudo@@EA"]
pub static nsCSSAnonBoxes_mozText: *mut nsICSSAnonBoxPseudo;
#[link_name = "?firstLetterContinuation@nsCSSAnonBoxes@@2PEAVnsICSSAnonBoxPseudo@@EA"]
pub static nsCSSAnonBoxes_firstLetterContinuation: *mut nsICSSAnonBoxPseudo;
#[link_name = "?mozBlockInsideInlineWrapper@nsCSSAnonBoxes@@2PEAVnsICSSAnonBoxPseudo@@EA"]
@ -10365,10 +10369,6 @@ cfg_if! {
pub static nsCSSAnonBoxes_mozMathMLAnonymousBlock: *mut nsICSSAnonBoxPseudo;
#[link_name = "?mozXULAnonymousBlock@nsCSSAnonBoxes@@2PEAVnsICSSAnonBoxPseudo@@EA"]
pub static nsCSSAnonBoxes_mozXULAnonymousBlock: *mut nsICSSAnonBoxPseudo;
#[link_name = "?horizontalFramesetBorder@nsCSSAnonBoxes@@2PEAVnsICSSAnonBoxPseudo@@EA"]
pub static nsCSSAnonBoxes_horizontalFramesetBorder: *mut nsICSSAnonBoxPseudo;
#[link_name = "?verticalFramesetBorder@nsCSSAnonBoxes@@2PEAVnsICSSAnonBoxPseudo@@EA"]
pub static nsCSSAnonBoxes_verticalFramesetBorder: *mut nsICSSAnonBoxPseudo;
#[link_name = "?mozLineFrame@nsCSSAnonBoxes@@2PEAVnsICSSAnonBoxPseudo@@EA"]
pub static nsCSSAnonBoxes_mozLineFrame: *mut nsICSSAnonBoxPseudo;
#[link_name = "?buttonContent@nsCSSAnonBoxes@@2PEAVnsICSSAnonBoxPseudo@@EA"]
@ -10379,8 +10379,6 @@ cfg_if! {
pub static nsCSSAnonBoxes_dropDownList: *mut nsICSSAnonBoxPseudo;
#[link_name = "?fieldsetContent@nsCSSAnonBoxes@@2PEAVnsICSSAnonBoxPseudo@@EA"]
pub static nsCSSAnonBoxes_fieldsetContent: *mut nsICSSAnonBoxPseudo;
#[link_name = "?framesetBlank@nsCSSAnonBoxes@@2PEAVnsICSSAnonBoxPseudo@@EA"]
pub static nsCSSAnonBoxes_framesetBlank: *mut nsICSSAnonBoxPseudo;
#[link_name = "?mozDisplayComboboxControlFrame@nsCSSAnonBoxes@@2PEAVnsICSSAnonBoxPseudo@@EA"]
pub static nsCSSAnonBoxes_mozDisplayComboboxControlFrame: *mut nsICSSAnonBoxPseudo;
#[link_name = "?htmlCanvasContent@nsCSSAnonBoxes@@2PEAVnsICSSAnonBoxPseudo@@EA"]
@ -10391,10 +10389,6 @@ cfg_if! {
pub static nsCSSAnonBoxes_table: *mut nsICSSAnonBoxPseudo;
#[link_name = "?tableCell@nsCSSAnonBoxes@@2PEAVnsICSSAnonBoxPseudo@@EA"]
pub static nsCSSAnonBoxes_tableCell: *mut nsICSSAnonBoxPseudo;
#[link_name = "?tableColGroup@nsCSSAnonBoxes@@2PEAVnsICSSAnonBoxPseudo@@EA"]
pub static nsCSSAnonBoxes_tableColGroup: *mut nsICSSAnonBoxPseudo;
#[link_name = "?tableCol@nsCSSAnonBoxes@@2PEAVnsICSSAnonBoxPseudo@@EA"]
pub static nsCSSAnonBoxes_tableCol: *mut nsICSSAnonBoxPseudo;
#[link_name = "?tableWrapper@nsCSSAnonBoxes@@2PEAVnsICSSAnonBoxPseudo@@EA"]
pub static nsCSSAnonBoxes_tableWrapper: *mut nsICSSAnonBoxPseudo;
#[link_name = "?tableRowGroup@nsCSSAnonBoxes@@2PEAVnsICSSAnonBoxPseudo@@EA"]
@ -10403,8 +10397,6 @@ cfg_if! {
pub static nsCSSAnonBoxes_tableRow: *mut nsICSSAnonBoxPseudo;
#[link_name = "?canvas@nsCSSAnonBoxes@@2PEAVnsICSSAnonBoxPseudo@@EA"]
pub static nsCSSAnonBoxes_canvas: *mut nsICSSAnonBoxPseudo;
#[link_name = "?pageBreak@nsCSSAnonBoxes@@2PEAVnsICSSAnonBoxPseudo@@EA"]
pub static nsCSSAnonBoxes_pageBreak: *mut nsICSSAnonBoxPseudo;
#[link_name = "?page@nsCSSAnonBoxes@@2PEAVnsICSSAnonBoxPseudo@@EA"]
pub static nsCSSAnonBoxes_page: *mut nsICSSAnonBoxPseudo;
#[link_name = "?pageContent@nsCSSAnonBoxes@@2PEAVnsICSSAnonBoxPseudo@@EA"]
@ -10540,8 +10532,6 @@ cfg_if! {
pub static nsGkAtoms_action: *mut nsStaticAtom;
#[link_name = "\x01?active@nsGkAtoms@@2PAVnsStaticAtom@@A"]
pub static nsGkAtoms_active: *mut nsStaticAtom;
#[link_name = "\x01?activetitlebarcolor@nsGkAtoms@@2PAVnsStaticAtom@@A"]
pub static nsGkAtoms_activetitlebarcolor: *mut nsStaticAtom;
#[link_name = "\x01?activateontab@nsGkAtoms@@2PAVnsStaticAtom@@A"]
pub static nsGkAtoms_activateontab: *mut nsStaticAtom;
#[link_name = "\x01?actuate@nsGkAtoms@@2PAVnsStaticAtom@@A"]
@ -11538,8 +11528,6 @@ cfg_if! {
pub static nsGkAtoms_implements: *mut nsStaticAtom;
#[link_name = "\x01?import@nsGkAtoms@@2PAVnsStaticAtom@@A"]
pub static nsGkAtoms_import: *mut nsStaticAtom;
#[link_name = "\x01?inactivetitlebarcolor@nsGkAtoms@@2PAVnsStaticAtom@@A"]
pub static nsGkAtoms_inactivetitlebarcolor: *mut nsStaticAtom;
#[link_name = "\x01?include@nsGkAtoms@@2PAVnsStaticAtom@@A"]
pub static nsGkAtoms_include: *mut nsStaticAtom;
#[link_name = "\x01?includes@nsGkAtoms@@2PAVnsStaticAtom@@A"]
@ -15578,10 +15566,22 @@ cfg_if! {
pub static nsCSSPseudoElements_placeholder: *mut nsICSSPseudoElement;
#[link_name = "\x01?mozColorSwatch@nsCSSPseudoElements@@2PAVnsICSSPseudoElement@@A"]
pub static nsCSSPseudoElements_mozColorSwatch: *mut nsICSSPseudoElement;
#[link_name = "\x01?mozText@nsCSSAnonBoxes@@2PAVnsICSSAnonBoxPseudo@@A"]
pub static nsCSSAnonBoxes_mozText: *mut nsICSSAnonBoxPseudo;
#[link_name = "\x01?oofPlaceholder@nsCSSAnonBoxes@@2PAVnsICSSAnonBoxPseudo@@A"]
pub static nsCSSAnonBoxes_oofPlaceholder: *mut nsICSSAnonBoxPseudo;
#[link_name = "\x01?horizontalFramesetBorder@nsCSSAnonBoxes@@2PAVnsICSSAnonBoxPseudo@@A"]
pub static nsCSSAnonBoxes_horizontalFramesetBorder: *mut nsICSSAnonBoxPseudo;
#[link_name = "\x01?verticalFramesetBorder@nsCSSAnonBoxes@@2PAVnsICSSAnonBoxPseudo@@A"]
pub static nsCSSAnonBoxes_verticalFramesetBorder: *mut nsICSSAnonBoxPseudo;
#[link_name = "\x01?framesetBlank@nsCSSAnonBoxes@@2PAVnsICSSAnonBoxPseudo@@A"]
pub static nsCSSAnonBoxes_framesetBlank: *mut nsICSSAnonBoxPseudo;
#[link_name = "\x01?tableColGroup@nsCSSAnonBoxes@@2PAVnsICSSAnonBoxPseudo@@A"]
pub static nsCSSAnonBoxes_tableColGroup: *mut nsICSSAnonBoxPseudo;
#[link_name = "\x01?tableCol@nsCSSAnonBoxes@@2PAVnsICSSAnonBoxPseudo@@A"]
pub static nsCSSAnonBoxes_tableCol: *mut nsICSSAnonBoxPseudo;
#[link_name = "\x01?pageBreak@nsCSSAnonBoxes@@2PAVnsICSSAnonBoxPseudo@@A"]
pub static nsCSSAnonBoxes_pageBreak: *mut nsICSSAnonBoxPseudo;
#[link_name = "\x01?mozText@nsCSSAnonBoxes@@2PAVnsICSSAnonBoxPseudo@@A"]
pub static nsCSSAnonBoxes_mozText: *mut nsICSSAnonBoxPseudo;
#[link_name = "\x01?firstLetterContinuation@nsCSSAnonBoxes@@2PAVnsICSSAnonBoxPseudo@@A"]
pub static nsCSSAnonBoxes_firstLetterContinuation: *mut nsICSSAnonBoxPseudo;
#[link_name = "\x01?mozBlockInsideInlineWrapper@nsCSSAnonBoxes@@2PAVnsICSSAnonBoxPseudo@@A"]
@ -15590,10 +15590,6 @@ cfg_if! {
pub static nsCSSAnonBoxes_mozMathMLAnonymousBlock: *mut nsICSSAnonBoxPseudo;
#[link_name = "\x01?mozXULAnonymousBlock@nsCSSAnonBoxes@@2PAVnsICSSAnonBoxPseudo@@A"]
pub static nsCSSAnonBoxes_mozXULAnonymousBlock: *mut nsICSSAnonBoxPseudo;
#[link_name = "\x01?horizontalFramesetBorder@nsCSSAnonBoxes@@2PAVnsICSSAnonBoxPseudo@@A"]
pub static nsCSSAnonBoxes_horizontalFramesetBorder: *mut nsICSSAnonBoxPseudo;
#[link_name = "\x01?verticalFramesetBorder@nsCSSAnonBoxes@@2PAVnsICSSAnonBoxPseudo@@A"]
pub static nsCSSAnonBoxes_verticalFramesetBorder: *mut nsICSSAnonBoxPseudo;
#[link_name = "\x01?mozLineFrame@nsCSSAnonBoxes@@2PAVnsICSSAnonBoxPseudo@@A"]
pub static nsCSSAnonBoxes_mozLineFrame: *mut nsICSSAnonBoxPseudo;
#[link_name = "\x01?buttonContent@nsCSSAnonBoxes@@2PAVnsICSSAnonBoxPseudo@@A"]
@ -15604,8 +15600,6 @@ cfg_if! {
pub static nsCSSAnonBoxes_dropDownList: *mut nsICSSAnonBoxPseudo;
#[link_name = "\x01?fieldsetContent@nsCSSAnonBoxes@@2PAVnsICSSAnonBoxPseudo@@A"]
pub static nsCSSAnonBoxes_fieldsetContent: *mut nsICSSAnonBoxPseudo;
#[link_name = "\x01?framesetBlank@nsCSSAnonBoxes@@2PAVnsICSSAnonBoxPseudo@@A"]
pub static nsCSSAnonBoxes_framesetBlank: *mut nsICSSAnonBoxPseudo;
#[link_name = "\x01?mozDisplayComboboxControlFrame@nsCSSAnonBoxes@@2PAVnsICSSAnonBoxPseudo@@A"]
pub static nsCSSAnonBoxes_mozDisplayComboboxControlFrame: *mut nsICSSAnonBoxPseudo;
#[link_name = "\x01?htmlCanvasContent@nsCSSAnonBoxes@@2PAVnsICSSAnonBoxPseudo@@A"]
@ -15616,10 +15610,6 @@ cfg_if! {
pub static nsCSSAnonBoxes_table: *mut nsICSSAnonBoxPseudo;
#[link_name = "\x01?tableCell@nsCSSAnonBoxes@@2PAVnsICSSAnonBoxPseudo@@A"]
pub static nsCSSAnonBoxes_tableCell: *mut nsICSSAnonBoxPseudo;
#[link_name = "\x01?tableColGroup@nsCSSAnonBoxes@@2PAVnsICSSAnonBoxPseudo@@A"]
pub static nsCSSAnonBoxes_tableColGroup: *mut nsICSSAnonBoxPseudo;
#[link_name = "\x01?tableCol@nsCSSAnonBoxes@@2PAVnsICSSAnonBoxPseudo@@A"]
pub static nsCSSAnonBoxes_tableCol: *mut nsICSSAnonBoxPseudo;
#[link_name = "\x01?tableWrapper@nsCSSAnonBoxes@@2PAVnsICSSAnonBoxPseudo@@A"]
pub static nsCSSAnonBoxes_tableWrapper: *mut nsICSSAnonBoxPseudo;
#[link_name = "\x01?tableRowGroup@nsCSSAnonBoxes@@2PAVnsICSSAnonBoxPseudo@@A"]
@ -15628,8 +15618,6 @@ cfg_if! {
pub static nsCSSAnonBoxes_tableRow: *mut nsICSSAnonBoxPseudo;
#[link_name = "\x01?canvas@nsCSSAnonBoxes@@2PAVnsICSSAnonBoxPseudo@@A"]
pub static nsCSSAnonBoxes_canvas: *mut nsICSSAnonBoxPseudo;
#[link_name = "\x01?pageBreak@nsCSSAnonBoxes@@2PAVnsICSSAnonBoxPseudo@@A"]
pub static nsCSSAnonBoxes_pageBreak: *mut nsICSSAnonBoxPseudo;
#[link_name = "\x01?page@nsCSSAnonBoxes@@2PAVnsICSSAnonBoxPseudo@@A"]
pub static nsCSSAnonBoxes_page: *mut nsICSSAnonBoxPseudo;
#[link_name = "\x01?pageContent@nsCSSAnonBoxes@@2PAVnsICSSAnonBoxPseudo@@A"]
@ -15768,8 +15756,6 @@ macro_rules! atom {
{{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_action as *mut _) } }};
("active") =>
{{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_active as *mut _) } }};
("activetitlebarcolor") =>
{{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_activetitlebarcolor as *mut _) } }};
("activateontab") =>
{{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_activateontab as *mut _) } }};
("actuate") =>
@ -16766,8 +16752,6 @@ macro_rules! atom {
{{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_implements as *mut _) } }};
("import") =>
{{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_import as *mut _) } }};
("inactivetitlebarcolor") =>
{{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_inactivetitlebarcolor as *mut _) } }};
("include") =>
{{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_include as *mut _) } }};
("includes") =>
@ -20806,10 +20790,22 @@ macro_rules! atom {
{{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsCSSPseudoElements_placeholder as *mut _) } }};
(":-moz-color-swatch") =>
{{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsCSSPseudoElements_mozColorSwatch as *mut _) } }};
(":-moz-text") =>
{{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsCSSAnonBoxes_mozText as *mut _) } }};
(":-moz-oof-placeholder") =>
{{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsCSSAnonBoxes_oofPlaceholder as *mut _) } }};
(":-moz-hframeset-border") =>
{{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsCSSAnonBoxes_horizontalFramesetBorder as *mut _) } }};
(":-moz-vframeset-border") =>
{{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsCSSAnonBoxes_verticalFramesetBorder as *mut _) } }};
(":-moz-frameset-blank") =>
{{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsCSSAnonBoxes_framesetBlank as *mut _) } }};
(":-moz-table-column-group") =>
{{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsCSSAnonBoxes_tableColGroup as *mut _) } }};
(":-moz-table-column") =>
{{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsCSSAnonBoxes_tableCol as *mut _) } }};
(":-moz-pagebreak") =>
{{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsCSSAnonBoxes_pageBreak as *mut _) } }};
(":-moz-text") =>
{{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsCSSAnonBoxes_mozText as *mut _) } }};
(":-moz-first-letter-continuation") =>
{{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsCSSAnonBoxes_firstLetterContinuation as *mut _) } }};
(":-moz-block-inside-inline-wrapper") =>
@ -20818,10 +20814,6 @@ macro_rules! atom {
{{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsCSSAnonBoxes_mozMathMLAnonymousBlock as *mut _) } }};
(":-moz-xul-anonymous-block") =>
{{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsCSSAnonBoxes_mozXULAnonymousBlock as *mut _) } }};
(":-moz-hframeset-border") =>
{{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsCSSAnonBoxes_horizontalFramesetBorder as *mut _) } }};
(":-moz-vframeset-border") =>
{{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsCSSAnonBoxes_verticalFramesetBorder as *mut _) } }};
(":-moz-line-frame") =>
{{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsCSSAnonBoxes_mozLineFrame as *mut _) } }};
(":-moz-button-content") =>
@ -20832,8 +20824,6 @@ macro_rules! atom {
{{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsCSSAnonBoxes_dropDownList as *mut _) } }};
(":-moz-fieldset-content") =>
{{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsCSSAnonBoxes_fieldsetContent as *mut _) } }};
(":-moz-frameset-blank") =>
{{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsCSSAnonBoxes_framesetBlank as *mut _) } }};
(":-moz-display-comboboxcontrol-frame") =>
{{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsCSSAnonBoxes_mozDisplayComboboxControlFrame as *mut _) } }};
(":-moz-html-canvas-content") =>
@ -20844,10 +20834,6 @@ macro_rules! atom {
{{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsCSSAnonBoxes_table as *mut _) } }};
(":-moz-table-cell") =>
{{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsCSSAnonBoxes_tableCell as *mut _) } }};
(":-moz-table-column-group") =>
{{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsCSSAnonBoxes_tableColGroup as *mut _) } }};
(":-moz-table-column") =>
{{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsCSSAnonBoxes_tableCol as *mut _) } }};
(":-moz-table-wrapper") =>
{{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsCSSAnonBoxes_tableWrapper as *mut _) } }};
(":-moz-table-row-group") =>
@ -20856,8 +20842,6 @@ macro_rules! atom {
{{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsCSSAnonBoxes_tableRow as *mut _) } }};
(":-moz-canvas") =>
{{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsCSSAnonBoxes_canvas as *mut _) } }};
(":-moz-pagebreak") =>
{{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsCSSAnonBoxes_pageBreak as *mut _) } }};
(":-moz-page") =>
{{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsCSSAnonBoxes_page as *mut _) } }};
(":-moz-pagecontent") =>

View file

@ -76,7 +76,6 @@ use gecko_bindings::structs::StyleShapeSource;
use gecko_bindings::structs::StyleTransition;
use gecko_bindings::structs::gfxFontFeatureValueSet;
use gecko_bindings::structs::nsCSSCounterDesc;
use gecko_bindings::structs::nsCSSCounterStyleRule;
use gecko_bindings::structs::nsCSSFontDesc;
use gecko_bindings::structs::nsCSSKeyword;
use gecko_bindings::structs::nsCSSPropertyID;
@ -433,6 +432,11 @@ pub struct RawServoRuleNode(RawServoRuleNodeVoid);
pub type RawServoFontFaceRuleStrong = ::gecko_bindings::sugar::ownership::Strong<RawServoFontFaceRule>;
pub type RawServoFontFaceRuleBorrowed<'a> = &'a RawServoFontFaceRule;
pub type RawServoFontFaceRuleBorrowedOrNull<'a> = Option<&'a RawServoFontFaceRule>;
pub type RawServoCounterStyleRuleStrong = ::gecko_bindings::sugar::ownership::Strong<RawServoCounterStyleRule>;
pub type RawServoCounterStyleRuleBorrowed<'a> = &'a RawServoCounterStyleRule;
pub type RawServoCounterStyleRuleBorrowedOrNull<'a> = Option<&'a RawServoCounterStyleRule>;
enum RawServoCounterStyleRuleVoid { }
pub struct RawServoCounterStyleRule(RawServoCounterStyleRuleVoid);
extern "C" {
pub fn Gecko_EnsureTArrayCapacity(
@ -550,6 +554,12 @@ extern "C" {
extern "C" {
pub fn Servo_FontFaceRule_Release(ptr: RawServoFontFaceRuleBorrowed);
}
extern "C" {
pub fn Servo_CounterStyleRule_AddRef(ptr: RawServoCounterStyleRuleBorrowed);
}
extern "C" {
pub fn Servo_CounterStyleRule_Release(ptr: RawServoCounterStyleRuleBorrowed);
}
extern "C" {
pub fn Servo_StyleSet_Drop(ptr: RawServoStyleSetOwned);
}
@ -1572,26 +1582,6 @@ extern "C" {
len: *mut u32,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn Gecko_CSSCounterStyle_Create(name: *mut nsAtom) -> *mut nsCSSCounterStyleRule;
}
extern "C" {
pub fn Gecko_CSSCounterStyle_Clone(
rule: *const nsCSSCounterStyleRule,
) -> *mut nsCSSCounterStyleRule;
}
extern "C" {
pub fn Gecko_CSSCounterStyle_GetCssText(
rule: *const nsCSSCounterStyleRule,
result: *mut nsAString,
);
}
extern "C" {
pub fn Gecko_CSSCounterStyleRule_AddRef(aPtr: *mut nsCSSCounterStyleRule);
}
extern "C" {
pub fn Gecko_CSSCounterStyleRule_Release(aPtr: *mut nsCSSCounterStyleRule);
}
extern "C" {
pub fn Gecko_IsDocumentBody(element: RawGeckoElementBorrowed) -> bool;
}
@ -2140,7 +2130,7 @@ extern "C" {
pub fn Servo_StyleSet_GetCounterStyleRule(
set: RawServoStyleSetBorrowed,
name: *mut nsAtom,
) -> *mut nsCSSCounterStyleRule;
) -> *const RawServoCounterStyleRule;
}
extern "C" {
pub fn Servo_StyleSet_BuildFontFeatureValueSet(
@ -2473,7 +2463,21 @@ extern "C" {
pub fn Servo_CssRules_GetCounterStyleRuleAt(
rules: ServoCssRulesBorrowed,
index: u32,
) -> *mut nsCSSCounterStyleRule;
line: *mut u32,
column: *mut u32,
) -> RawServoCounterStyleRuleStrong;
}
extern "C" {
pub fn Servo_CounterStyleRule_Debug(
rule: RawServoCounterStyleRuleBorrowed,
result: *mut nsACString,
);
}
extern "C" {
pub fn Servo_CounterStyleRule_GetCssText(
rule: RawServoCounterStyleRuleBorrowed,
result: *mut nsAString,
);
}
extern "C" {
pub fn Servo_StyleRule_GetStyle(
@ -2675,6 +2679,56 @@ extern "C" {
desc: nsCSSFontDesc,
);
}
extern "C" {
pub fn Servo_CounterStyleRule_GetName(rule: RawServoCounterStyleRuleBorrowed) -> *mut nsAtom;
}
extern "C" {
pub fn Servo_CounterStyleRule_SetName(
rule: RawServoCounterStyleRuleBorrowed,
name: *const nsACString,
) -> bool;
}
extern "C" {
pub fn Servo_CounterStyleRule_GetGeneration(rule: RawServoCounterStyleRuleBorrowed) -> u32;
}
extern "C" {
pub fn Servo_CounterStyleRule_GetSystem(rule: RawServoCounterStyleRuleBorrowed) -> u8;
}
extern "C" {
pub fn Servo_CounterStyleRule_GetExtended(
rule: RawServoCounterStyleRuleBorrowed,
) -> *mut nsAtom;
}
extern "C" {
pub fn Servo_CounterStyleRule_GetFixedFirstValue(rule: RawServoCounterStyleRuleBorrowed)
-> i32;
}
extern "C" {
pub fn Servo_CounterStyleRule_GetFallback(
rule: RawServoCounterStyleRuleBorrowed,
) -> *mut nsAtom;
}
extern "C" {
pub fn Servo_CounterStyleRule_GetDescriptor(
rule: RawServoCounterStyleRuleBorrowed,
desc: nsCSSCounterDesc,
result: nsCSSValueBorrowedMut,
);
}
extern "C" {
pub fn Servo_CounterStyleRule_GetDescriptorCssText(
rule: RawServoCounterStyleRuleBorrowed,
desc: nsCSSCounterDesc,
result: *mut nsAString,
);
}
extern "C" {
pub fn Servo_CounterStyleRule_SetDescriptor(
rule: RawServoCounterStyleRuleBorrowed,
desc: nsCSSCounterDesc,
value: *const nsACString,
) -> bool;
}
extern "C" {
pub fn Servo_ParseProperty(
property: nsCSSPropertyID,
@ -3317,17 +3371,6 @@ extern "C" {
result: *mut RawGeckoGfxMatrix4x4,
) -> bool;
}
extern "C" {
pub fn Servo_ParseCounterStyleName(value: *const nsACString) -> *mut nsAtom;
}
extern "C" {
pub fn Servo_ParseCounterStyleDescriptor(
aDescriptor: nsCSSCounterDesc,
aValue: *const nsACString,
aURLExtraData: *mut RawGeckoURLExtraData,
aResult: *mut nsCSSValue,
) -> bool;
}
extern "C" {
pub fn Servo_ParseFontShorthandForMatching(
value: *const nsAString,
@ -3341,6 +3384,9 @@ extern "C" {
extern "C" {
pub fn Servo_Property_IsShorthand(name: *const nsACString, found: *mut bool) -> bool;
}
extern "C" {
pub fn Servo_PseudoClass_GetStates(name: *const nsACString) -> u64;
}
extern "C" {
pub fn Gecko_CreateCSSErrorReporter(
sheet: *mut ServoStyleSheet,

View file

@ -55,10 +55,22 @@ pub enum PseudoElement {
Placeholder,
/// :-moz-color-swatch
MozColorSwatch,
/// :-moz-text
MozText,
/// :-moz-oof-placeholder
OofPlaceholder,
/// :-moz-hframeset-border
HorizontalFramesetBorder,
/// :-moz-vframeset-border
VerticalFramesetBorder,
/// :-moz-frameset-blank
FramesetBlank,
/// :-moz-table-column-group
TableColGroup,
/// :-moz-table-column
TableCol,
/// :-moz-pagebreak
PageBreak,
/// :-moz-text
MozText,
/// :-moz-first-letter-continuation
FirstLetterContinuation,
/// :-moz-block-inside-inline-wrapper
@ -67,10 +79,6 @@ pub enum PseudoElement {
MozMathMLAnonymousBlock,
/// :-moz-xul-anonymous-block
MozXULAnonymousBlock,
/// :-moz-hframeset-border
HorizontalFramesetBorder,
/// :-moz-vframeset-border
VerticalFramesetBorder,
/// :-moz-line-frame
MozLineFrame,
/// :-moz-button-content
@ -81,8 +89,6 @@ pub enum PseudoElement {
DropDownList,
/// :-moz-fieldset-content
FieldsetContent,
/// :-moz-frameset-blank
FramesetBlank,
/// :-moz-display-comboboxcontrol-frame
MozDisplayComboboxControlFrame,
/// :-moz-html-canvas-content
@ -93,10 +99,6 @@ pub enum PseudoElement {
Table,
/// :-moz-table-cell
TableCell,
/// :-moz-table-column-group
TableColGroup,
/// :-moz-table-column
TableCol,
/// :-moz-table-wrapper
TableWrapper,
/// :-moz-table-row-group
@ -105,8 +107,6 @@ pub enum PseudoElement {
TableRow,
/// :-moz-canvas
Canvas,
/// :-moz-pagebreak
PageBreak,
/// :-moz-page
Page,
/// :-moz-pagecontent
@ -229,32 +229,32 @@ impl PseudoElement {
PseudoElement::MozPlaceholder => atom!(":-moz-placeholder"),
PseudoElement::Placeholder => atom!(":placeholder"),
PseudoElement::MozColorSwatch => atom!(":-moz-color-swatch"),
PseudoElement::MozText => atom!(":-moz-text"),
PseudoElement::OofPlaceholder => atom!(":-moz-oof-placeholder"),
PseudoElement::HorizontalFramesetBorder => atom!(":-moz-hframeset-border"),
PseudoElement::VerticalFramesetBorder => atom!(":-moz-vframeset-border"),
PseudoElement::FramesetBlank => atom!(":-moz-frameset-blank"),
PseudoElement::TableColGroup => atom!(":-moz-table-column-group"),
PseudoElement::TableCol => atom!(":-moz-table-column"),
PseudoElement::PageBreak => atom!(":-moz-pagebreak"),
PseudoElement::MozText => atom!(":-moz-text"),
PseudoElement::FirstLetterContinuation => atom!(":-moz-first-letter-continuation"),
PseudoElement::MozBlockInsideInlineWrapper => atom!(":-moz-block-inside-inline-wrapper"),
PseudoElement::MozMathMLAnonymousBlock => atom!(":-moz-mathml-anonymous-block"),
PseudoElement::MozXULAnonymousBlock => atom!(":-moz-xul-anonymous-block"),
PseudoElement::HorizontalFramesetBorder => atom!(":-moz-hframeset-border"),
PseudoElement::VerticalFramesetBorder => atom!(":-moz-vframeset-border"),
PseudoElement::MozLineFrame => atom!(":-moz-line-frame"),
PseudoElement::ButtonContent => atom!(":-moz-button-content"),
PseudoElement::CellContent => atom!(":-moz-cell-content"),
PseudoElement::DropDownList => atom!(":-moz-dropdown-list"),
PseudoElement::FieldsetContent => atom!(":-moz-fieldset-content"),
PseudoElement::FramesetBlank => atom!(":-moz-frameset-blank"),
PseudoElement::MozDisplayComboboxControlFrame => atom!(":-moz-display-comboboxcontrol-frame"),
PseudoElement::HtmlCanvasContent => atom!(":-moz-html-canvas-content"),
PseudoElement::InlineTable => atom!(":-moz-inline-table"),
PseudoElement::Table => atom!(":-moz-table"),
PseudoElement::TableCell => atom!(":-moz-table-cell"),
PseudoElement::TableColGroup => atom!(":-moz-table-column-group"),
PseudoElement::TableCol => atom!(":-moz-table-column"),
PseudoElement::TableWrapper => atom!(":-moz-table-wrapper"),
PseudoElement::TableRowGroup => atom!(":-moz-table-row-group"),
PseudoElement::TableRow => atom!(":-moz-table-row"),
PseudoElement::Canvas => atom!(":-moz-canvas"),
PseudoElement::PageBreak => atom!(":-moz-pagebreak"),
PseudoElement::Page => atom!(":-moz-page"),
PseudoElement::PageContent => atom!(":-moz-pagecontent"),
PseudoElement::PageSequence => atom!(":-moz-page-sequence"),
@ -318,32 +318,32 @@ impl PseudoElement {
PseudoElement::MozPlaceholder => 22,
PseudoElement::Placeholder => 23,
PseudoElement::MozColorSwatch => 24,
PseudoElement::MozText => 25,
PseudoElement::OofPlaceholder => 26,
PseudoElement::FirstLetterContinuation => 27,
PseudoElement::MozBlockInsideInlineWrapper => 28,
PseudoElement::MozMathMLAnonymousBlock => 29,
PseudoElement::MozXULAnonymousBlock => 30,
PseudoElement::HorizontalFramesetBorder => 31,
PseudoElement::VerticalFramesetBorder => 32,
PseudoElement::MozLineFrame => 33,
PseudoElement::ButtonContent => 34,
PseudoElement::CellContent => 35,
PseudoElement::DropDownList => 36,
PseudoElement::FieldsetContent => 37,
PseudoElement::FramesetBlank => 38,
PseudoElement::MozDisplayComboboxControlFrame => 39,
PseudoElement::HtmlCanvasContent => 40,
PseudoElement::InlineTable => 41,
PseudoElement::Table => 42,
PseudoElement::TableCell => 43,
PseudoElement::TableColGroup => 44,
PseudoElement::TableCol => 45,
PseudoElement::TableWrapper => 46,
PseudoElement::TableRowGroup => 47,
PseudoElement::TableRow => 48,
PseudoElement::Canvas => 49,
PseudoElement::PageBreak => 50,
PseudoElement::OofPlaceholder => 25,
PseudoElement::HorizontalFramesetBorder => 26,
PseudoElement::VerticalFramesetBorder => 27,
PseudoElement::FramesetBlank => 28,
PseudoElement::TableColGroup => 29,
PseudoElement::TableCol => 30,
PseudoElement::PageBreak => 31,
PseudoElement::MozText => 32,
PseudoElement::FirstLetterContinuation => 33,
PseudoElement::MozBlockInsideInlineWrapper => 34,
PseudoElement::MozMathMLAnonymousBlock => 35,
PseudoElement::MozXULAnonymousBlock => 36,
PseudoElement::MozLineFrame => 37,
PseudoElement::ButtonContent => 38,
PseudoElement::CellContent => 39,
PseudoElement::DropDownList => 40,
PseudoElement::FieldsetContent => 41,
PseudoElement::MozDisplayComboboxControlFrame => 42,
PseudoElement::HtmlCanvasContent => 43,
PseudoElement::InlineTable => 44,
PseudoElement::Table => 45,
PseudoElement::TableCell => 46,
PseudoElement::TableWrapper => 47,
PseudoElement::TableRowGroup => 48,
PseudoElement::TableRow => 49,
PseudoElement::Canvas => 50,
PseudoElement::Page => 51,
PseudoElement::PageContent => 52,
PseudoElement::PageSequence => 53,
@ -472,32 +472,32 @@ impl PseudoElement {
#[inline]
pub fn is_anon_box(&self) -> bool {
match *self {
PseudoElement::MozText => true,
PseudoElement::OofPlaceholder => true,
PseudoElement::HorizontalFramesetBorder => true,
PseudoElement::VerticalFramesetBorder => true,
PseudoElement::FramesetBlank => true,
PseudoElement::TableColGroup => true,
PseudoElement::TableCol => true,
PseudoElement::PageBreak => true,
PseudoElement::MozText => true,
PseudoElement::FirstLetterContinuation => true,
PseudoElement::MozBlockInsideInlineWrapper => true,
PseudoElement::MozMathMLAnonymousBlock => true,
PseudoElement::MozXULAnonymousBlock => true,
PseudoElement::HorizontalFramesetBorder => true,
PseudoElement::VerticalFramesetBorder => true,
PseudoElement::MozLineFrame => true,
PseudoElement::ButtonContent => true,
PseudoElement::CellContent => true,
PseudoElement::DropDownList => true,
PseudoElement::FieldsetContent => true,
PseudoElement::FramesetBlank => true,
PseudoElement::MozDisplayComboboxControlFrame => true,
PseudoElement::HtmlCanvasContent => true,
PseudoElement::InlineTable => true,
PseudoElement::Table => true,
PseudoElement::TableCell => true,
PseudoElement::TableColGroup => true,
PseudoElement::TableCol => true,
PseudoElement::TableWrapper => true,
PseudoElement::TableRowGroup => true,
PseudoElement::TableRow => true,
PseudoElement::Canvas => true,
PseudoElement::PageBreak => true,
PseudoElement::Page => true,
PseudoElement::PageContent => true,
PseudoElement::PageSequence => true,
@ -613,10 +613,22 @@ impl PseudoElement {
structs::SERVO_CSS_PSEUDO_ELEMENT_FLAGS_placeholder,
PseudoElement::MozColorSwatch =>
structs::SERVO_CSS_PSEUDO_ELEMENT_FLAGS_mozColorSwatch,
PseudoElement::MozText =>
structs::CSS_PSEUDO_ELEMENT_ENABLED_IN_UA_SHEETS,
PseudoElement::OofPlaceholder =>
structs::CSS_PSEUDO_ELEMENT_ENABLED_IN_UA_SHEETS,
PseudoElement::HorizontalFramesetBorder =>
structs::CSS_PSEUDO_ELEMENT_ENABLED_IN_UA_SHEETS,
PseudoElement::VerticalFramesetBorder =>
structs::CSS_PSEUDO_ELEMENT_ENABLED_IN_UA_SHEETS,
PseudoElement::FramesetBlank =>
structs::CSS_PSEUDO_ELEMENT_ENABLED_IN_UA_SHEETS,
PseudoElement::TableColGroup =>
structs::CSS_PSEUDO_ELEMENT_ENABLED_IN_UA_SHEETS,
PseudoElement::TableCol =>
structs::CSS_PSEUDO_ELEMENT_ENABLED_IN_UA_SHEETS,
PseudoElement::PageBreak =>
structs::CSS_PSEUDO_ELEMENT_ENABLED_IN_UA_SHEETS,
PseudoElement::MozText =>
structs::CSS_PSEUDO_ELEMENT_ENABLED_IN_UA_SHEETS,
PseudoElement::FirstLetterContinuation =>
structs::CSS_PSEUDO_ELEMENT_ENABLED_IN_UA_SHEETS,
PseudoElement::MozBlockInsideInlineWrapper =>
@ -625,10 +637,6 @@ impl PseudoElement {
structs::CSS_PSEUDO_ELEMENT_ENABLED_IN_UA_SHEETS,
PseudoElement::MozXULAnonymousBlock =>
structs::CSS_PSEUDO_ELEMENT_ENABLED_IN_UA_SHEETS,
PseudoElement::HorizontalFramesetBorder =>
structs::CSS_PSEUDO_ELEMENT_ENABLED_IN_UA_SHEETS,
PseudoElement::VerticalFramesetBorder =>
structs::CSS_PSEUDO_ELEMENT_ENABLED_IN_UA_SHEETS,
PseudoElement::MozLineFrame =>
structs::CSS_PSEUDO_ELEMENT_ENABLED_IN_UA_SHEETS,
PseudoElement::ButtonContent =>
@ -639,8 +647,6 @@ impl PseudoElement {
structs::CSS_PSEUDO_ELEMENT_ENABLED_IN_UA_SHEETS,
PseudoElement::FieldsetContent =>
structs::CSS_PSEUDO_ELEMENT_ENABLED_IN_UA_SHEETS,
PseudoElement::FramesetBlank =>
structs::CSS_PSEUDO_ELEMENT_ENABLED_IN_UA_SHEETS,
PseudoElement::MozDisplayComboboxControlFrame =>
structs::CSS_PSEUDO_ELEMENT_ENABLED_IN_UA_SHEETS,
PseudoElement::HtmlCanvasContent =>
@ -651,10 +657,6 @@ impl PseudoElement {
structs::CSS_PSEUDO_ELEMENT_ENABLED_IN_UA_SHEETS,
PseudoElement::TableCell =>
structs::CSS_PSEUDO_ELEMENT_ENABLED_IN_UA_SHEETS,
PseudoElement::TableColGroup =>
structs::CSS_PSEUDO_ELEMENT_ENABLED_IN_UA_SHEETS,
PseudoElement::TableCol =>
structs::CSS_PSEUDO_ELEMENT_ENABLED_IN_UA_SHEETS,
PseudoElement::TableWrapper =>
structs::CSS_PSEUDO_ELEMENT_ENABLED_IN_UA_SHEETS,
PseudoElement::TableRowGroup =>
@ -663,8 +665,6 @@ impl PseudoElement {
structs::CSS_PSEUDO_ELEMENT_ENABLED_IN_UA_SHEETS,
PseudoElement::Canvas =>
structs::CSS_PSEUDO_ELEMENT_ENABLED_IN_UA_SHEETS,
PseudoElement::PageBreak =>
structs::CSS_PSEUDO_ELEMENT_ENABLED_IN_UA_SHEETS,
PseudoElement::Page =>
structs::CSS_PSEUDO_ELEMENT_ENABLED_IN_UA_SHEETS,
PseudoElement::PageContent =>
@ -844,32 +844,32 @@ impl PseudoElement {
PseudoElement::MozPlaceholder => CSSPseudoElementType::mozPlaceholder,
PseudoElement::Placeholder => CSSPseudoElementType::placeholder,
PseudoElement::MozColorSwatch => CSSPseudoElementType::mozColorSwatch,
PseudoElement::MozText => CSSPseudoElementType_InheritingAnonBox,
PseudoElement::OofPlaceholder => CSSPseudoElementType::NonInheritingAnonBox,
PseudoElement::HorizontalFramesetBorder => CSSPseudoElementType::NonInheritingAnonBox,
PseudoElement::VerticalFramesetBorder => CSSPseudoElementType::NonInheritingAnonBox,
PseudoElement::FramesetBlank => CSSPseudoElementType::NonInheritingAnonBox,
PseudoElement::TableColGroup => CSSPseudoElementType::NonInheritingAnonBox,
PseudoElement::TableCol => CSSPseudoElementType::NonInheritingAnonBox,
PseudoElement::PageBreak => CSSPseudoElementType::NonInheritingAnonBox,
PseudoElement::MozText => CSSPseudoElementType_InheritingAnonBox,
PseudoElement::FirstLetterContinuation => CSSPseudoElementType_InheritingAnonBox,
PseudoElement::MozBlockInsideInlineWrapper => CSSPseudoElementType_InheritingAnonBox,
PseudoElement::MozMathMLAnonymousBlock => CSSPseudoElementType_InheritingAnonBox,
PseudoElement::MozXULAnonymousBlock => CSSPseudoElementType_InheritingAnonBox,
PseudoElement::HorizontalFramesetBorder => CSSPseudoElementType::NonInheritingAnonBox,
PseudoElement::VerticalFramesetBorder => CSSPseudoElementType::NonInheritingAnonBox,
PseudoElement::MozLineFrame => CSSPseudoElementType_InheritingAnonBox,
PseudoElement::ButtonContent => CSSPseudoElementType_InheritingAnonBox,
PseudoElement::CellContent => CSSPseudoElementType_InheritingAnonBox,
PseudoElement::DropDownList => CSSPseudoElementType_InheritingAnonBox,
PseudoElement::FieldsetContent => CSSPseudoElementType_InheritingAnonBox,
PseudoElement::FramesetBlank => CSSPseudoElementType::NonInheritingAnonBox,
PseudoElement::MozDisplayComboboxControlFrame => CSSPseudoElementType_InheritingAnonBox,
PseudoElement::HtmlCanvasContent => CSSPseudoElementType_InheritingAnonBox,
PseudoElement::InlineTable => CSSPseudoElementType_InheritingAnonBox,
PseudoElement::Table => CSSPseudoElementType_InheritingAnonBox,
PseudoElement::TableCell => CSSPseudoElementType_InheritingAnonBox,
PseudoElement::TableColGroup => CSSPseudoElementType::NonInheritingAnonBox,
PseudoElement::TableCol => CSSPseudoElementType::NonInheritingAnonBox,
PseudoElement::TableWrapper => CSSPseudoElementType_InheritingAnonBox,
PseudoElement::TableRowGroup => CSSPseudoElementType_InheritingAnonBox,
PseudoElement::TableRow => CSSPseudoElementType_InheritingAnonBox,
PseudoElement::Canvas => CSSPseudoElementType_InheritingAnonBox,
PseudoElement::PageBreak => CSSPseudoElementType::NonInheritingAnonBox,
PseudoElement::Page => CSSPseudoElementType_InheritingAnonBox,
PseudoElement::PageContent => CSSPseudoElementType_InheritingAnonBox,
PseudoElement::PageSequence => CSSPseudoElementType_InheritingAnonBox,
@ -1006,12 +1006,30 @@ impl PseudoElement {
if atom == &atom!(":-moz-color-swatch") {
return Some(PseudoElement::MozColorSwatch);
}
if atom == &atom!(":-moz-text") {
return Some(PseudoElement::MozText);
}
if atom == &atom!(":-moz-oof-placeholder") {
return Some(PseudoElement::OofPlaceholder);
}
if atom == &atom!(":-moz-hframeset-border") {
return Some(PseudoElement::HorizontalFramesetBorder);
}
if atom == &atom!(":-moz-vframeset-border") {
return Some(PseudoElement::VerticalFramesetBorder);
}
if atom == &atom!(":-moz-frameset-blank") {
return Some(PseudoElement::FramesetBlank);
}
if atom == &atom!(":-moz-table-column-group") {
return Some(PseudoElement::TableColGroup);
}
if atom == &atom!(":-moz-table-column") {
return Some(PseudoElement::TableCol);
}
if atom == &atom!(":-moz-pagebreak") {
return Some(PseudoElement::PageBreak);
}
if atom == &atom!(":-moz-text") {
return Some(PseudoElement::MozText);
}
if atom == &atom!(":-moz-first-letter-continuation") {
return Some(PseudoElement::FirstLetterContinuation);
}
@ -1024,12 +1042,6 @@ impl PseudoElement {
if atom == &atom!(":-moz-xul-anonymous-block") {
return Some(PseudoElement::MozXULAnonymousBlock);
}
if atom == &atom!(":-moz-hframeset-border") {
return Some(PseudoElement::HorizontalFramesetBorder);
}
if atom == &atom!(":-moz-vframeset-border") {
return Some(PseudoElement::VerticalFramesetBorder);
}
if atom == &atom!(":-moz-line-frame") {
return Some(PseudoElement::MozLineFrame);
}
@ -1045,9 +1057,6 @@ impl PseudoElement {
if atom == &atom!(":-moz-fieldset-content") {
return Some(PseudoElement::FieldsetContent);
}
if atom == &atom!(":-moz-frameset-blank") {
return Some(PseudoElement::FramesetBlank);
}
if atom == &atom!(":-moz-display-comboboxcontrol-frame") {
return Some(PseudoElement::MozDisplayComboboxControlFrame);
}
@ -1063,12 +1072,6 @@ impl PseudoElement {
if atom == &atom!(":-moz-table-cell") {
return Some(PseudoElement::TableCell);
}
if atom == &atom!(":-moz-table-column-group") {
return Some(PseudoElement::TableColGroup);
}
if atom == &atom!(":-moz-table-column") {
return Some(PseudoElement::TableCol);
}
if atom == &atom!(":-moz-table-wrapper") {
return Some(PseudoElement::TableWrapper);
}
@ -1081,9 +1084,6 @@ impl PseudoElement {
if atom == &atom!(":-moz-canvas") {
return Some(PseudoElement::Canvas);
}
if atom == &atom!(":-moz-pagebreak") {
return Some(PseudoElement::PageBreak);
}
if atom == &atom!(":-moz-page") {
return Some(PseudoElement::Page);
}
@ -1161,12 +1161,30 @@ impl PseudoElement {
/// Construct a pseudo-element from an anonymous box `Atom`.
#[inline]
pub fn from_anon_box_atom(atom: &Atom) -> Option<Self> {
if atom == &atom!(":-moz-text") {
return Some(PseudoElement::MozText);
}
if atom == &atom!(":-moz-oof-placeholder") {
return Some(PseudoElement::OofPlaceholder);
}
if atom == &atom!(":-moz-hframeset-border") {
return Some(PseudoElement::HorizontalFramesetBorder);
}
if atom == &atom!(":-moz-vframeset-border") {
return Some(PseudoElement::VerticalFramesetBorder);
}
if atom == &atom!(":-moz-frameset-blank") {
return Some(PseudoElement::FramesetBlank);
}
if atom == &atom!(":-moz-table-column-group") {
return Some(PseudoElement::TableColGroup);
}
if atom == &atom!(":-moz-table-column") {
return Some(PseudoElement::TableCol);
}
if atom == &atom!(":-moz-pagebreak") {
return Some(PseudoElement::PageBreak);
}
if atom == &atom!(":-moz-text") {
return Some(PseudoElement::MozText);
}
if atom == &atom!(":-moz-first-letter-continuation") {
return Some(PseudoElement::FirstLetterContinuation);
}
@ -1179,12 +1197,6 @@ impl PseudoElement {
if atom == &atom!(":-moz-xul-anonymous-block") {
return Some(PseudoElement::MozXULAnonymousBlock);
}
if atom == &atom!(":-moz-hframeset-border") {
return Some(PseudoElement::HorizontalFramesetBorder);
}
if atom == &atom!(":-moz-vframeset-border") {
return Some(PseudoElement::VerticalFramesetBorder);
}
if atom == &atom!(":-moz-line-frame") {
return Some(PseudoElement::MozLineFrame);
}
@ -1200,9 +1212,6 @@ impl PseudoElement {
if atom == &atom!(":-moz-fieldset-content") {
return Some(PseudoElement::FieldsetContent);
}
if atom == &atom!(":-moz-frameset-blank") {
return Some(PseudoElement::FramesetBlank);
}
if atom == &atom!(":-moz-display-comboboxcontrol-frame") {
return Some(PseudoElement::MozDisplayComboboxControlFrame);
}
@ -1218,12 +1227,6 @@ impl PseudoElement {
if atom == &atom!(":-moz-table-cell") {
return Some(PseudoElement::TableCell);
}
if atom == &atom!(":-moz-table-column-group") {
return Some(PseudoElement::TableColGroup);
}
if atom == &atom!(":-moz-table-column") {
return Some(PseudoElement::TableCol);
}
if atom == &atom!(":-moz-table-wrapper") {
return Some(PseudoElement::TableWrapper);
}
@ -1236,9 +1239,6 @@ impl PseudoElement {
if atom == &atom!(":-moz-canvas") {
return Some(PseudoElement::Canvas);
}
if atom == &atom!(":-moz-pagebreak") {
return Some(PseudoElement::PageBreak);
}
if atom == &atom!(":-moz-page") {
return Some(PseudoElement::Page);
}
@ -1440,12 +1440,30 @@ impl PseudoElement {
"-moz-color-swatch" => {
return Some(PseudoElement::MozColorSwatch)
}
"-moz-text" => {
return Some(PseudoElement::MozText)
}
"-moz-oof-placeholder" => {
return Some(PseudoElement::OofPlaceholder)
}
"-moz-hframeset-border" => {
return Some(PseudoElement::HorizontalFramesetBorder)
}
"-moz-vframeset-border" => {
return Some(PseudoElement::VerticalFramesetBorder)
}
"-moz-frameset-blank" => {
return Some(PseudoElement::FramesetBlank)
}
"-moz-table-column-group" => {
return Some(PseudoElement::TableColGroup)
}
"-moz-table-column" => {
return Some(PseudoElement::TableCol)
}
"-moz-pagebreak" => {
return Some(PseudoElement::PageBreak)
}
"-moz-text" => {
return Some(PseudoElement::MozText)
}
"-moz-first-letter-continuation" => {
return Some(PseudoElement::FirstLetterContinuation)
}
@ -1458,12 +1476,6 @@ impl PseudoElement {
"-moz-xul-anonymous-block" => {
return Some(PseudoElement::MozXULAnonymousBlock)
}
"-moz-hframeset-border" => {
return Some(PseudoElement::HorizontalFramesetBorder)
}
"-moz-vframeset-border" => {
return Some(PseudoElement::VerticalFramesetBorder)
}
"-moz-line-frame" => {
return Some(PseudoElement::MozLineFrame)
}
@ -1479,9 +1491,6 @@ impl PseudoElement {
"-moz-fieldset-content" => {
return Some(PseudoElement::FieldsetContent)
}
"-moz-frameset-blank" => {
return Some(PseudoElement::FramesetBlank)
}
"-moz-display-comboboxcontrol-frame" => {
return Some(PseudoElement::MozDisplayComboboxControlFrame)
}
@ -1497,12 +1506,6 @@ impl PseudoElement {
"-moz-table-cell" => {
return Some(PseudoElement::TableCell)
}
"-moz-table-column-group" => {
return Some(PseudoElement::TableColGroup)
}
"-moz-table-column" => {
return Some(PseudoElement::TableCol)
}
"-moz-table-wrapper" => {
return Some(PseudoElement::TableWrapper)
}
@ -1515,9 +1518,6 @@ impl PseudoElement {
"-moz-canvas" => {
return Some(PseudoElement::Canvas)
}
"-moz-pagebreak" => {
return Some(PseudoElement::PageBreak)
}
"-moz-page" => {
return Some(PseudoElement::Page)
}
@ -1664,32 +1664,32 @@ impl ToCss for PseudoElement {
PseudoElement::MozPlaceholder => dest.write_str(":-moz-placeholder")?,
PseudoElement::Placeholder => dest.write_str(":placeholder")?,
PseudoElement::MozColorSwatch => dest.write_str(":-moz-color-swatch")?,
PseudoElement::MozText => dest.write_str(":-moz-text")?,
PseudoElement::OofPlaceholder => dest.write_str(":-moz-oof-placeholder")?,
PseudoElement::HorizontalFramesetBorder => dest.write_str(":-moz-hframeset-border")?,
PseudoElement::VerticalFramesetBorder => dest.write_str(":-moz-vframeset-border")?,
PseudoElement::FramesetBlank => dest.write_str(":-moz-frameset-blank")?,
PseudoElement::TableColGroup => dest.write_str(":-moz-table-column-group")?,
PseudoElement::TableCol => dest.write_str(":-moz-table-column")?,
PseudoElement::PageBreak => dest.write_str(":-moz-pagebreak")?,
PseudoElement::MozText => dest.write_str(":-moz-text")?,
PseudoElement::FirstLetterContinuation => dest.write_str(":-moz-first-letter-continuation")?,
PseudoElement::MozBlockInsideInlineWrapper => dest.write_str(":-moz-block-inside-inline-wrapper")?,
PseudoElement::MozMathMLAnonymousBlock => dest.write_str(":-moz-mathml-anonymous-block")?,
PseudoElement::MozXULAnonymousBlock => dest.write_str(":-moz-xul-anonymous-block")?,
PseudoElement::HorizontalFramesetBorder => dest.write_str(":-moz-hframeset-border")?,
PseudoElement::VerticalFramesetBorder => dest.write_str(":-moz-vframeset-border")?,
PseudoElement::MozLineFrame => dest.write_str(":-moz-line-frame")?,
PseudoElement::ButtonContent => dest.write_str(":-moz-button-content")?,
PseudoElement::CellContent => dest.write_str(":-moz-cell-content")?,
PseudoElement::DropDownList => dest.write_str(":-moz-dropdown-list")?,
PseudoElement::FieldsetContent => dest.write_str(":-moz-fieldset-content")?,
PseudoElement::FramesetBlank => dest.write_str(":-moz-frameset-blank")?,
PseudoElement::MozDisplayComboboxControlFrame => dest.write_str(":-moz-display-comboboxcontrol-frame")?,
PseudoElement::HtmlCanvasContent => dest.write_str(":-moz-html-canvas-content")?,
PseudoElement::InlineTable => dest.write_str(":-moz-inline-table")?,
PseudoElement::Table => dest.write_str(":-moz-table")?,
PseudoElement::TableCell => dest.write_str(":-moz-table-cell")?,
PseudoElement::TableColGroup => dest.write_str(":-moz-table-column-group")?,
PseudoElement::TableCol => dest.write_str(":-moz-table-column")?,
PseudoElement::TableWrapper => dest.write_str(":-moz-table-wrapper")?,
PseudoElement::TableRowGroup => dest.write_str(":-moz-table-row-group")?,
PseudoElement::TableRow => dest.write_str(":-moz-table-row")?,
PseudoElement::Canvas => dest.write_str(":-moz-canvas")?,
PseudoElement::PageBreak => dest.write_str(":-moz-pagebreak")?,
PseudoElement::Page => dest.write_str(":-moz-page")?,
PseudoElement::PageContent => dest.write_str(":-moz-pagecontent")?,
PseudoElement::PageSequence => dest.write_str(":-moz-page-sequence")?,

File diff suppressed because it is too large Load diff

View file

@ -9,17 +9,10 @@ use computed_values::{font_stretch, font_style, font_weight};
use counter_style::{self, CounterBound};
use cssparser::UnicodeRange;
use font_face::{Source, FontDisplay, FontWeight};
use gecko_bindings::bindings;
use gecko_bindings::structs::{self, nsCSSValue};
use gecko_bindings::structs::{nsCSSCounterDesc, nsCSSCounterStyleRule};
use gecko_bindings::sugar::ns_css_value::ToNsCssValue;
use gecko_bindings::sugar::refptr::{RefPtr, UniqueRefPtr};
use nsstring::nsString;
use properties::longhands::font_language_override;
use shared_lock::{ToCssWithGuard, SharedRwLockReadGuard};
use std::fmt::{self, Write};
use std::str;
use str::CssStringWriter;
use values::computed::font::FamilyName;
use values::generics::font::FontTag;
use values::specified::font::{SpecifiedFontVariationSettings, SpecifiedFontFeatureSettings};
@ -192,101 +185,62 @@ impl<'a> ToNsCssValue for &'a FontDisplay {
}
}
/// A @counter-style rule
pub type CounterStyleRule = RefPtr<nsCSSCounterStyleRule>;
impl CounterStyleRule {
/// Ask Gecko to deep clone the nsCSSCounterStyleRule, and then construct
/// a CounterStyleRule object from it.
pub fn deep_clone_from_gecko(&self) -> CounterStyleRule {
let result = unsafe {
UniqueRefPtr::from_addrefed(
bindings::Gecko_CSSCounterStyle_Clone(self.get()))
};
result.get()
}
}
impl From<counter_style::CounterStyleRuleData> for CounterStyleRule {
fn from(data: counter_style::CounterStyleRuleData) -> CounterStyleRule {
let mut result = unsafe {
UniqueRefPtr::from_addrefed(
bindings::Gecko_CSSCounterStyle_Create(data.name().0.as_ptr()))
};
data.set_descriptors(&mut result.mValues);
result.get()
}
}
impl ToCssWithGuard for CounterStyleRule {
fn to_css(&self, _guard: &SharedRwLockReadGuard, dest: &mut CssStringWriter) -> fmt::Result {
let mut css_text = nsString::new();
unsafe {
bindings::Gecko_CSSCounterStyle_GetCssText(self.get(), &mut *css_text);
}
write!(dest, "{}", css_text)
}
}
/// The type of nsCSSCounterStyleRule::mValues
pub type CounterStyleDescriptors = [nsCSSValue; nsCSSCounterDesc::eCSSCounterDesc_COUNT as usize];
impl ToNsCssValue for counter_style::System {
impl<'a> ToNsCssValue for &'a counter_style::System {
fn convert(self, nscssvalue: &mut nsCSSValue) {
use counter_style::System::*;
match self {
match *self {
Cyclic => nscssvalue.set_enum(structs::NS_STYLE_COUNTER_SYSTEM_CYCLIC as i32),
Numeric => nscssvalue.set_enum(structs::NS_STYLE_COUNTER_SYSTEM_NUMERIC as i32),
Alphabetic => nscssvalue.set_enum(structs::NS_STYLE_COUNTER_SYSTEM_ALPHABETIC as i32),
Symbolic => nscssvalue.set_enum(structs::NS_STYLE_COUNTER_SYSTEM_SYMBOLIC as i32),
Additive => nscssvalue.set_enum(structs::NS_STYLE_COUNTER_SYSTEM_ADDITIVE as i32),
Fixed { first_symbol_value } => {
Fixed { ref first_symbol_value } => {
let mut a = nsCSSValue::null();
let mut b = nsCSSValue::null();
a.set_enum(structs::NS_STYLE_COUNTER_SYSTEM_FIXED as i32);
b.set_integer(first_symbol_value.map_or(1, |v| v.value()));
nscssvalue.set_pair(&a, &b);
}
Extends(other) => {
Extends(ref other) => {
let mut a = nsCSSValue::null();
let mut b = nsCSSValue::null();
a.set_enum(structs::NS_STYLE_COUNTER_SYSTEM_EXTENDS as i32);
b.set_atom_ident(other.0);
b.set_atom_ident(other.0.clone());
nscssvalue.set_pair(&a, &b);
}
}
}
}
impl ToNsCssValue for counter_style::Negative {
impl<'a> ToNsCssValue for &'a counter_style::Negative {
fn convert(self, nscssvalue: &mut nsCSSValue) {
if let Some(second) = self.1 {
if let Some(ref second) = self.1 {
let mut a = nsCSSValue::null();
let mut b = nsCSSValue::null();
a.set_from(self.0);
a.set_from(&self.0);
b.set_from(second);
nscssvalue.set_pair(&a, &b);
} else {
nscssvalue.set_from(self.0)
nscssvalue.set_from(&self.0)
}
}
}
impl ToNsCssValue for counter_style::Symbol {
impl<'a> ToNsCssValue for &'a counter_style::Symbol {
fn convert(self, nscssvalue: &mut nsCSSValue) {
match self {
counter_style::Symbol::String(s) => nscssvalue.set_string(&s),
counter_style::Symbol::Ident(s) => nscssvalue.set_ident_from_atom(&s.0),
match *self {
counter_style::Symbol::String(ref s) => nscssvalue.set_string(s),
counter_style::Symbol::Ident(ref s) => nscssvalue.set_ident_from_atom(&s.0),
}
}
}
impl ToNsCssValue for counter_style::Ranges {
impl<'a> ToNsCssValue for &'a counter_style::Ranges {
fn convert(self, nscssvalue: &mut nsCSSValue) {
if self.0.is_empty() {
nscssvalue.set_auto();
} else {
nscssvalue.set_pair_list(self.0.into_iter().map(|range| {
nscssvalue.set_pair_list(self.0.iter().map(|range| {
fn set_bound(bound: CounterBound, nscssvalue: &mut nsCSSValue) {
if let CounterBound::Integer(finite) = bound {
nscssvalue.set_integer(finite.value())
@ -304,25 +258,25 @@ impl ToNsCssValue for counter_style::Ranges {
}
}
impl ToNsCssValue for counter_style::Pad {
impl<'a> ToNsCssValue for &'a counter_style::Pad {
fn convert(self, nscssvalue: &mut nsCSSValue) {
let mut min_length = nsCSSValue::null();
let mut pad_with = nsCSSValue::null();
min_length.set_integer(self.0.value());
pad_with.set_from(self.1);
pad_with.set_from(&self.1);
nscssvalue.set_pair(&min_length, &pad_with);
}
}
impl ToNsCssValue for counter_style::Fallback {
impl<'a> ToNsCssValue for &'a counter_style::Fallback {
fn convert(self, nscssvalue: &mut nsCSSValue) {
nscssvalue.set_atom_ident(self.0 .0)
nscssvalue.set_atom_ident(self.0 .0.clone())
}
}
impl ToNsCssValue for counter_style::Symbols {
impl<'a> ToNsCssValue for &'a counter_style::Symbols {
fn convert(self, nscssvalue: &mut nsCSSValue) {
nscssvalue.set_list(self.0.into_iter().map(|item| {
nscssvalue.set_list(self.0.iter().map(|item| {
let mut value = nsCSSValue::null();
value.set_from(item);
value
@ -330,27 +284,27 @@ impl ToNsCssValue for counter_style::Symbols {
}
}
impl ToNsCssValue for counter_style::AdditiveSymbols {
impl<'a> ToNsCssValue for &'a counter_style::AdditiveSymbols {
fn convert(self, nscssvalue: &mut nsCSSValue) {
nscssvalue.set_pair_list(self.0.into_iter().map(|tuple| {
nscssvalue.set_pair_list(self.0.iter().map(|tuple| {
let mut weight = nsCSSValue::null();
let mut symbol = nsCSSValue::null();
weight.set_integer(tuple.weight.value());
symbol.set_from(tuple.symbol);
symbol.set_from(&tuple.symbol);
(weight, symbol)
}));
}
}
impl ToNsCssValue for counter_style::SpeakAs {
impl<'a> ToNsCssValue for &'a counter_style::SpeakAs {
fn convert(self, nscssvalue: &mut nsCSSValue) {
use counter_style::SpeakAs::*;
match self {
match *self {
Auto => nscssvalue.set_auto(),
Bullets => nscssvalue.set_enum(structs::NS_STYLE_COUNTER_SPEAKAS_BULLETS as i32),
Numbers => nscssvalue.set_enum(structs::NS_STYLE_COUNTER_SPEAKAS_NUMBERS as i32),
Words => nscssvalue.set_enum(structs::NS_STYLE_COUNTER_SPEAKAS_WORDS as i32),
Other(other) => nscssvalue.set_atom_ident(other.0),
Other(ref other) => nscssvalue.set_atom_ident(other.0.clone()),
}
}
}