diff options
author | Martin Robinson <mrobinson@igalia.com> | 2023-09-01 11:58:48 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-01 09:58:48 +0000 |
commit | e9281e2eda53f45cf1c902a843158c1dc2494a89 (patch) | |
tree | 6c9d5be99b77a99a448444943c3d018f78f14dfa /components/script/dom | |
parent | 6eb3e165787449492ee12f3bd1a6f8529356f7e6 (diff) | |
download | servo-e9281e2eda53f45cf1c902a843158c1dc2494a89.tar.gz servo-e9281e2eda53f45cf1c902a843158c1dc2494a89.zip |
build(deps): bump bitflags from 1.3.2 to 2.3.1 (#30273)
Bumps [bitflags](https://github.com/bitflags/bitflags) from 1.3.2 to 2.3.1.
- [Release notes](https://github.com/bitflags/bitflags/releases)
- [Changelog](https://github.com/bitflags/bitflags/blob/main/CHANGELOG.md)
- [Commits](https://github.com/bitflags/bitflags/compare/1.3.2...2.3.1)
Diffstat (limited to 'components/script/dom')
-rw-r--r-- | components/script/dom/bindings/codegen/CodegenRust.py | 2 | ||||
-rw-r--r-- | components/script/dom/htmliframeelement.rs | 6 | ||||
-rw-r--r-- | components/script/dom/node.rs | 24 | ||||
-rwxr-xr-x | components/script/dom/validitystate.rs | 6 | ||||
-rw-r--r-- | components/script/dom/webglrenderingcontext.rs | 16 |
5 files changed, 32 insertions, 22 deletions
diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py index 0c39ecf2f3e..bc7f2ceb9a8 100644 --- a/components/script/dom/bindings/codegen/CodegenRust.py +++ b/components/script/dom/bindings/codegen/CodegenRust.py @@ -7964,7 +7964,7 @@ class GlobalGenRoots(): global_flags = CGWrapper(CGIndenter(CGList([ CGGeneric("const %s = %#x;" % args) for args in flags - ], "\n")), pre="pub struct Globals: u8 {\n", post="\n}") + ], "\n")), pre="#[derive(Clone, Copy)]\npub struct Globals: u8 {\n", post="\n}") globals_ = CGWrapper(CGIndenter(global_flags), pre="bitflags! {\n", post="\n}") phf = CGGeneric("include!(concat!(env!(\"OUT_DIR\"), \"/InterfaceObjectMapPhf.rs\"));") diff --git a/components/script/dom/htmliframeelement.rs b/components/script/dom/htmliframeelement.rs index 55c515d8c1d..99a4fd15a11 100644 --- a/components/script/dom/htmliframeelement.rs +++ b/components/script/dom/htmliframeelement.rs @@ -43,9 +43,11 @@ use servo_url::ServoUrl; use std::cell::Cell; use style::attr::{AttrValue, LengthOrPercentageOrAuto}; +#[derive(Clone, Copy, JSTraceable, MallocSizeOf)] +struct SandboxAllowance(u8); + bitflags! { - #[derive(JSTraceable, MallocSizeOf)] - struct SandboxAllowance: u8 { + impl SandboxAllowance: u8 { const ALLOW_NOTHING = 0x00; const ALLOW_SAME_ORIGIN = 0x01; const ALLOW_TOP_NAVIGATION = 0x02; diff --git a/components/script/dom/node.rs b/components/script/dom/node.rs index 7e3367b9b2a..797d57dfa6e 100644 --- a/components/script/dom/node.rs +++ b/components/script/dom/node.rs @@ -157,28 +157,30 @@ pub struct Node { style_and_layout_data: DomRefCell<Option<Box<StyleAndOpaqueLayoutData>>>, } +/// Flags for node items +#[derive(Clone, Copy, JSTraceable, MallocSizeOf)] +pub struct NodeFlags(u16); + bitflags! { - #[doc = "Flags for node items."] - #[derive(JSTraceable, MallocSizeOf)] - pub struct NodeFlags: u16 { - #[doc = "Specifies whether this node is in a document."] + impl NodeFlags: u16 { + /// Specifies whether this node is in a document. const IS_IN_DOC = 1 << 0; - #[doc = "Specifies whether this node needs style recalc on next reflow."] + /// Specifies whether this node needs style recalc on next reflow. const HAS_DIRTY_DESCENDANTS = 1 << 1; - #[doc = "Specifies whether or not there is an authentic click in progress on \ - this element."] + /// Specifies whether or not there is an authentic click in progress on + /// this element. const CLICK_IN_PROGRESS = 1 << 2; - #[doc = "Specifies whether this node is focusable and whether it is supposed \ - to be reachable with using sequential focus navigation."] + /// Specifies whether this node is focusable and whether it is supposed + /// to be reachable with using sequential focus navigation."] const SEQUENTIALLY_FOCUSABLE = 1 << 3; // There are two free bits here. - #[doc = "Specifies whether the parser has set an associated form owner for \ - this element. Only applicable for form-associatable elements."] + /// Specifies whether the parser has set an associated form owner for + /// this element. Only applicable for form-associatable elements. const PARSER_ASSOCIATED_FORM_OWNER = 1 << 6; /// Whether this element has a snapshot stored due to a style or diff --git a/components/script/dom/validitystate.rs b/components/script/dom/validitystate.rs index 2af3843c203..81f4c254e43 100755 --- a/components/script/dom/validitystate.rs +++ b/components/script/dom/validitystate.rs @@ -20,9 +20,11 @@ use std::fmt; use style::element_state::ElementState; // https://html.spec.whatwg.org/multipage/#validity-states +#[derive(Clone, Copy, JSTraceable, MallocSizeOf)] +pub struct ValidationFlags(u32); + bitflags! { - #[derive(JSTraceable, MallocSizeOf)] - pub struct ValidationFlags: u32 { + impl ValidationFlags: u32 { const VALUE_MISSING = 0b0000000001; const TYPE_MISMATCH = 0b0000000010; const PATTERN_MISMATCH = 0b0000000100; diff --git a/components/script/dom/webglrenderingcontext.rs b/components/script/dom/webglrenderingcontext.rs index 39807da9a81..b6225850975 100644 --- a/components/script/dom/webglrenderingcontext.rs +++ b/components/script/dom/webglrenderingcontext.rs @@ -136,10 +136,12 @@ where ObjectValue(rval.get()) } +/// Set of bitflags for texture unpacking (texImage2d, etc...) +#[derive(Clone, Copy, JSTraceable, MallocSizeOf)] +struct TextureUnpacking(u8); + bitflags! { - /// Set of bitflags for texture unpacking (texImage2d, etc...) - #[derive(JSTraceable, MallocSizeOf)] - struct TextureUnpacking: u8 { + impl TextureUnpacking: u8 { const FLIP_Y_AXIS = 0x01; const PREMULTIPLY_ALPHA = 0x02; const CONVERT_COLORSPACE = 0x04; @@ -4703,12 +4705,14 @@ macro_rules! capabilities { capabilities!($name, $next, $($rest,)* [$name = 1;]); }; ($prev:ident, $name:ident, $($rest:ident,)* [$($tt:tt)*]) => { - capabilities!($name, $($rest,)* [$($tt)* $name = Self::$prev.bits << 1;]); + capabilities!($name, $($rest,)* [$($tt)* $name = Self::$prev.bits() << 1;]); }; ($prev:ident, [$($name:ident = $value:expr;)*]) => { + #[derive(Clone, Copy, JSTraceable, MallocSizeOf)] + pub struct CapFlags(u16); + bitflags! { - #[derive(JSTraceable, MallocSizeOf)] - struct CapFlags: u16 { + impl CapFlags: u16 { $(const $name = $value;)* } } |