mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Auto merge of #18179 - davidcl:master, r=jdm
Automatically verify that derive() lists are alphabetically ordered #… <!-- Please describe your changes on the following line: --> Automatically verify that derive() lists are alphabetically ordered #18172 --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #18172 (github issue number if applicable). <!-- Either: --> - [X] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18179) <!-- Reviewable:end -->
This commit is contained in:
commit
4743696189
197 changed files with 568 additions and 552 deletions
|
@ -29,7 +29,7 @@ impl<T: DomObject> SimpleWorkerErrorHandler<T> {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone)]
|
||||
#[derive(Clone, Copy)]
|
||||
pub struct SharedRt {
|
||||
rt: *mut JSRuntime
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ use std::sync::mpsc::{Receiver, Sender};
|
|||
/// A ScriptChan that can be cloned freely and will silently send a TrustedWorkerAddress with
|
||||
/// common event loop messages. While this SendableWorkerScriptChan is alive, the associated
|
||||
/// Worker object will remain alive.
|
||||
#[derive(JSTraceable, Clone)]
|
||||
#[derive(Clone, JSTraceable)]
|
||||
pub struct SendableWorkerScriptChan<T: DomObject> {
|
||||
pub sender: Sender<(Trusted<T>, CommonScriptMsg)>,
|
||||
pub worker: Trusted<T>,
|
||||
|
@ -34,7 +34,7 @@ impl<T: JSTraceable + DomObject + 'static> ScriptChan for SendableWorkerScriptCh
|
|||
/// A ScriptChan that can be cloned freely and will silently send a TrustedWorkerAddress with
|
||||
/// worker event loop messages. While this SendableWorkerScriptChan is alive, the associated
|
||||
/// Worker object will remain alive.
|
||||
#[derive(JSTraceable, Clone)]
|
||||
#[derive(Clone, JSTraceable)]
|
||||
pub struct WorkerThreadWorkerChan<T: DomObject> {
|
||||
pub sender: Sender<(Trusted<T>, WorkerScriptMsg)>,
|
||||
pub worker: Trusted<T>,
|
||||
|
|
|
@ -25,7 +25,7 @@ use std::ptr;
|
|||
use std::rc::Rc;
|
||||
|
||||
/// The exception handling used for a call.
|
||||
#[derive(Copy, Clone, PartialEq)]
|
||||
#[derive(Clone, Copy, PartialEq)]
|
||||
pub enum ExceptionHandling {
|
||||
/// Report any exception and don't throw it to the caller code.
|
||||
Report,
|
||||
|
|
|
@ -170,7 +170,7 @@ impl ToJSValConvertible for USVString {
|
|||
}
|
||||
|
||||
/// Behavior for stringification of `JSVal`s.
|
||||
#[derive(PartialEq, Clone)]
|
||||
#[derive(Clone, PartialEq)]
|
||||
pub enum StringificationBehavior {
|
||||
/// Convert `null` to the string `"null"`.
|
||||
Default,
|
||||
|
|
|
@ -25,7 +25,7 @@ use libc::c_uint;
|
|||
use std::slice::from_raw_parts;
|
||||
|
||||
/// DOM exceptions that can be thrown by a native DOM method.
|
||||
#[derive(Debug, Clone, HeapSizeOf)]
|
||||
#[derive(Clone, Debug, HeapSizeOf)]
|
||||
pub enum Error {
|
||||
/// IndexSizeError DOMException
|
||||
IndexSize,
|
||||
|
|
|
@ -108,7 +108,7 @@ use script_thread::ScriptThread;
|
|||
use std::ptr;
|
||||
|
||||
/// The class of a non-callback interface object.
|
||||
#[derive(Copy, Clone)]
|
||||
#[derive(Clone, Copy)]
|
||||
pub struct NonCallbackInterfaceObjectClass {
|
||||
/// The SpiderMonkey Class structure.
|
||||
pub class: Class,
|
||||
|
|
|
@ -22,7 +22,7 @@ use std::cell::Cell;
|
|||
use std::ptr;
|
||||
|
||||
/// The values that an iterator will iterate over.
|
||||
#[derive(JSTraceable, HeapSizeOf)]
|
||||
#[derive(HeapSizeOf, JSTraceable)]
|
||||
pub enum IteratorType {
|
||||
/// The keys of the iterable object.
|
||||
Keys,
|
||||
|
|
|
@ -11,7 +11,7 @@ use libc;
|
|||
use std::ptr;
|
||||
|
||||
/// The class of a namespace object.
|
||||
#[derive(Copy, Clone)]
|
||||
#[derive(Clone, Copy)]
|
||||
pub struct NamespaceObjectClass(JSClass);
|
||||
|
||||
unsafe impl Sync for NamespaceObjectClass {}
|
||||
|
|
|
@ -9,7 +9,7 @@ use num_traits::Float;
|
|||
use std::ops::Deref;
|
||||
|
||||
/// Encapsulates the IDL restricted float type.
|
||||
#[derive(JSTraceable, Clone, Copy, Eq, PartialEq)]
|
||||
#[derive(Clone, Copy, Eq, JSTraceable, PartialEq)]
|
||||
pub struct Finite<T: Float>(T);
|
||||
|
||||
impl<T: Float> Finite<T> {
|
||||
|
|
|
@ -15,7 +15,7 @@ use std::thread;
|
|||
|
||||
thread_local!(static STACK: RefCell<Vec<StackEntry>> = RefCell::new(Vec::new()));
|
||||
|
||||
#[derive(PartialEq, Eq, Debug, JSTraceable)]
|
||||
#[derive(Debug, Eq, JSTraceable, PartialEq)]
|
||||
enum StackEntryKind {
|
||||
Incumbent,
|
||||
Entry,
|
||||
|
|
|
@ -18,7 +18,7 @@ use std::str;
|
|||
use std::str::{Bytes, FromStr};
|
||||
|
||||
/// Encapsulates the IDL `ByteString` type.
|
||||
#[derive(JSTraceable, Clone, Eq, PartialEq, HeapSizeOf, Debug)]
|
||||
#[derive(Clone, Debug, Eq, HeapSizeOf, JSTraceable, PartialEq)]
|
||||
pub struct ByteString(Vec<u8>);
|
||||
|
||||
impl ByteString {
|
||||
|
|
|
@ -47,7 +47,7 @@ impl HeapSizeOf for WindowProxyHandler {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(JSTraceable, HeapSizeOf)]
|
||||
#[derive(HeapSizeOf, JSTraceable)]
|
||||
/// Static data associated with a global object.
|
||||
pub struct GlobalStaticData {
|
||||
/// The WindowProxy proxy handler for this global.
|
||||
|
@ -79,7 +79,7 @@ pub const JSCLASS_DOM_GLOBAL: u32 = js::JSCLASS_USERBIT1;
|
|||
|
||||
|
||||
/// The struct that holds inheritance information for DOM object reflectors.
|
||||
#[derive(Copy, Clone)]
|
||||
#[derive(Clone, Copy)]
|
||||
pub struct DOMClass {
|
||||
/// A list of interfaces that this object implements, in order of decreasing
|
||||
/// derivedness.
|
||||
|
|
|
@ -24,7 +24,7 @@ pub struct CanvasGradient {
|
|||
stops: DOMRefCell<Vec<CanvasGradientStop>>,
|
||||
}
|
||||
|
||||
#[derive(JSTraceable, Clone, HeapSizeOf)]
|
||||
#[derive(Clone, HeapSizeOf, JSTraceable)]
|
||||
pub enum CanvasGradientStyle {
|
||||
Linear(LinearGradientStyle),
|
||||
Radial(RadialGradientStyle),
|
||||
|
|
|
@ -51,7 +51,7 @@ use std::sync::Arc;
|
|||
use unpremultiplytable::UNPREMULTIPLY_TABLE;
|
||||
|
||||
#[must_root]
|
||||
#[derive(JSTraceable, Clone, HeapSizeOf)]
|
||||
#[derive(Clone, HeapSizeOf, JSTraceable)]
|
||||
#[allow(dead_code)]
|
||||
enum CanvasFillOrStrokeStyle {
|
||||
Color(RGBA),
|
||||
|
@ -81,7 +81,7 @@ pub struct CanvasRenderingContext2D {
|
|||
}
|
||||
|
||||
#[must_root]
|
||||
#[derive(JSTraceable, Clone, HeapSizeOf)]
|
||||
#[derive(Clone, HeapSizeOf, JSTraceable)]
|
||||
struct CanvasContextState {
|
||||
global_alpha: f64,
|
||||
global_composition: CompositionOrBlending,
|
||||
|
|
|
@ -154,7 +154,7 @@ impl CSSStyleOwner {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(PartialEq, HeapSizeOf)]
|
||||
#[derive(HeapSizeOf, PartialEq)]
|
||||
pub enum CSSModificationAccess {
|
||||
ReadWrite,
|
||||
Readonly,
|
||||
|
|
|
@ -372,7 +372,7 @@ impl CustomElementRegistryMethods for CustomElementRegistry {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(HeapSizeOf, JSTraceable, Clone)]
|
||||
#[derive(Clone, HeapSizeOf, JSTraceable)]
|
||||
pub struct LifecycleCallbacks {
|
||||
#[ignore_heap_size_of = "Rc"]
|
||||
connected_callback: Option<Rc<Function>>,
|
||||
|
@ -387,14 +387,14 @@ pub struct LifecycleCallbacks {
|
|||
attribute_changed_callback: Option<Rc<Function>>,
|
||||
}
|
||||
|
||||
#[derive(HeapSizeOf, JSTraceable, Clone)]
|
||||
#[derive(Clone, HeapSizeOf, JSTraceable)]
|
||||
pub enum ConstructionStackEntry {
|
||||
Element(Root<Element>),
|
||||
AlreadyConstructedMarker,
|
||||
}
|
||||
|
||||
/// https://html.spec.whatwg.org/multipage/#custom-element-definition
|
||||
#[derive(HeapSizeOf, JSTraceable, Clone)]
|
||||
#[derive(Clone, HeapSizeOf, JSTraceable)]
|
||||
pub struct CustomElementDefinition {
|
||||
pub name: LocalName,
|
||||
|
||||
|
@ -620,7 +620,7 @@ pub enum CallbackReaction {
|
|||
}
|
||||
|
||||
/// https://html.spec.whatwg.org/multipage/#processing-the-backup-element-queue
|
||||
#[derive(HeapSizeOf, JSTraceable, Eq, PartialEq, Clone, Copy)]
|
||||
#[derive(Clone, Copy, Eq, HeapSizeOf, JSTraceable, PartialEq)]
|
||||
enum BackupElementQueueFlag {
|
||||
Processing,
|
||||
NotProcessing,
|
||||
|
|
|
@ -193,7 +193,7 @@ impl PendingRestyle {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, JSTraceable, HeapSizeOf)]
|
||||
#[derive(Clone, HeapSizeOf, JSTraceable)]
|
||||
#[must_root]
|
||||
struct StyleSheetInDocument {
|
||||
#[ignore_heap_size_of = "Arc"]
|
||||
|
@ -353,7 +353,7 @@ pub struct Document {
|
|||
form_id_listener_map: DOMRefCell<HashMap<Atom, HashSet<JS<Element>>>>,
|
||||
}
|
||||
|
||||
#[derive(JSTraceable, HeapSizeOf)]
|
||||
#[derive(HeapSizeOf, JSTraceable)]
|
||||
struct ImagesFilter;
|
||||
impl CollectionFilter for ImagesFilter {
|
||||
fn filter(&self, elem: &Element, _root: &Node) -> bool {
|
||||
|
@ -361,7 +361,7 @@ impl CollectionFilter for ImagesFilter {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(JSTraceable, HeapSizeOf)]
|
||||
#[derive(HeapSizeOf, JSTraceable)]
|
||||
struct EmbedsFilter;
|
||||
impl CollectionFilter for EmbedsFilter {
|
||||
fn filter(&self, elem: &Element, _root: &Node) -> bool {
|
||||
|
@ -369,7 +369,7 @@ impl CollectionFilter for EmbedsFilter {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(JSTraceable, HeapSizeOf)]
|
||||
#[derive(HeapSizeOf, JSTraceable)]
|
||||
struct LinksFilter;
|
||||
impl CollectionFilter for LinksFilter {
|
||||
fn filter(&self, elem: &Element, _root: &Node) -> bool {
|
||||
|
@ -378,7 +378,7 @@ impl CollectionFilter for LinksFilter {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(JSTraceable, HeapSizeOf)]
|
||||
#[derive(HeapSizeOf, JSTraceable)]
|
||||
struct FormsFilter;
|
||||
impl CollectionFilter for FormsFilter {
|
||||
fn filter(&self, elem: &Element, _root: &Node) -> bool {
|
||||
|
@ -386,7 +386,7 @@ impl CollectionFilter for FormsFilter {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(JSTraceable, HeapSizeOf)]
|
||||
#[derive(HeapSizeOf, JSTraceable)]
|
||||
struct ScriptsFilter;
|
||||
impl CollectionFilter for ScriptsFilter {
|
||||
fn filter(&self, elem: &Element, _root: &Node) -> bool {
|
||||
|
@ -394,7 +394,7 @@ impl CollectionFilter for ScriptsFilter {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(JSTraceable, HeapSizeOf)]
|
||||
#[derive(HeapSizeOf, JSTraceable)]
|
||||
struct AnchorsFilter;
|
||||
impl CollectionFilter for AnchorsFilter {
|
||||
fn filter(&self, elem: &Element, _root: &Node) -> bool {
|
||||
|
@ -402,7 +402,7 @@ impl CollectionFilter for AnchorsFilter {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(JSTraceable, HeapSizeOf)]
|
||||
#[derive(HeapSizeOf, JSTraceable)]
|
||||
struct AppletsFilter;
|
||||
impl CollectionFilter for AppletsFilter {
|
||||
fn filter(&self, elem: &Element, _root: &Node) -> bool {
|
||||
|
@ -2027,7 +2027,7 @@ impl Document {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(PartialEq, HeapSizeOf)]
|
||||
#[derive(HeapSizeOf, PartialEq)]
|
||||
pub enum DocumentSource {
|
||||
FromParser,
|
||||
NotFromParser,
|
||||
|
@ -2141,7 +2141,7 @@ fn url_has_network_scheme(url: &ServoUrl) -> bool {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, HeapSizeOf, JSTraceable, PartialEq, Eq)]
|
||||
#[derive(Clone, Copy, Eq, HeapSizeOf, JSTraceable, PartialEq)]
|
||||
pub enum HasBrowsingContext {
|
||||
No,
|
||||
Yes,
|
||||
|
@ -3513,7 +3513,7 @@ impl DocumentMethods for Document {
|
|||
#[allow(unsafe_code)]
|
||||
// https://html.spec.whatwg.org/multipage/#dom-tree-accessors:dom-document-nameditem-filter
|
||||
unsafe fn NamedGetter(&self, _cx: *mut JSContext, name: DOMString) -> Option<NonZero<*mut JSObject>> {
|
||||
#[derive(JSTraceable, HeapSizeOf)]
|
||||
#[derive(HeapSizeOf, JSTraceable)]
|
||||
struct NamedElementFilter {
|
||||
name: Atom,
|
||||
}
|
||||
|
@ -4033,7 +4033,7 @@ impl Runnable for DocumentProgressHandler {
|
|||
}
|
||||
|
||||
/// Specifies the type of focus event that is sent to a pipeline
|
||||
#[derive(Copy, Clone, PartialEq)]
|
||||
#[derive(Clone, Copy, PartialEq)]
|
||||
pub enum FocusType {
|
||||
Element, // The first focus message - focus the element itself
|
||||
Parent, // Focusing a parent element (an iframe)
|
||||
|
@ -4051,7 +4051,7 @@ pub enum FocusEventType {
|
|||
/// If the page is observed to be using `requestAnimationFrame()` for non-animation purposes (i.e.
|
||||
/// without mutating the DOM), then we fall back to simple timeouts to save energy over video
|
||||
/// refresh.
|
||||
#[derive(JSTraceable, HeapSizeOf)]
|
||||
#[derive(HeapSizeOf, JSTraceable)]
|
||||
pub struct FakeRequestAnimationFrameCallback {
|
||||
/// The document.
|
||||
#[ignore_heap_size_of = "non-owning"]
|
||||
|
|
|
@ -12,7 +12,7 @@ use dom::globalscope::GlobalScope;
|
|||
use dom_struct::dom_struct;
|
||||
|
||||
#[repr(u16)]
|
||||
#[derive(JSTraceable, Copy, Clone, Debug, HeapSizeOf)]
|
||||
#[derive(Clone, Copy, Debug, HeapSizeOf, JSTraceable)]
|
||||
pub enum DOMErrorName {
|
||||
IndexSizeError = DOMExceptionConstants::INDEX_SIZE_ERR,
|
||||
HierarchyRequestError = DOMExceptionConstants::HIERARCHY_REQUEST_ERR,
|
||||
|
|
|
@ -170,7 +170,7 @@ impl fmt::Debug for Root<Element> {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(PartialEq, HeapSizeOf)]
|
||||
#[derive(HeapSizeOf, PartialEq)]
|
||||
pub enum ElementCreator {
|
||||
ParserCreated(u64),
|
||||
ScriptCreated,
|
||||
|
@ -182,7 +182,7 @@ pub enum CustomElementCreationMode {
|
|||
}
|
||||
|
||||
/// https://dom.spec.whatwg.org/#concept-element-custom-element-state
|
||||
#[derive(Clone, Copy, PartialEq, Eq, HeapSizeOf, JSTraceable)]
|
||||
#[derive(Clone, Copy, Eq, HeapSizeOf, JSTraceable, PartialEq)]
|
||||
pub enum CustomElementState {
|
||||
Undefined,
|
||||
Failed,
|
||||
|
@ -2981,7 +2981,7 @@ impl<'a> AttributeMutation<'a> {
|
|||
/// A holder for an element's "tag name", which will be lazily
|
||||
/// resolved and cached. Should be reset when the document
|
||||
/// owner changes.
|
||||
#[derive(JSTraceable, HeapSizeOf)]
|
||||
#[derive(HeapSizeOf, JSTraceable)]
|
||||
struct TagName {
|
||||
ptr: DOMRefCell<Option<LocalName>>,
|
||||
}
|
||||
|
|
|
@ -294,7 +294,7 @@ impl EventMethods for Event {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(PartialEq, HeapSizeOf, Copy, Clone)]
|
||||
#[derive(Clone, Copy, HeapSizeOf, PartialEq)]
|
||||
pub enum EventBubbles {
|
||||
Bubbles,
|
||||
DoesNotBubble
|
||||
|
@ -318,7 +318,7 @@ impl From<EventBubbles> for bool {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(PartialEq, HeapSizeOf, Copy, Clone)]
|
||||
#[derive(Clone, Copy, HeapSizeOf, PartialEq)]
|
||||
pub enum EventCancelable {
|
||||
Cancelable,
|
||||
NotCancelable
|
||||
|
@ -342,7 +342,7 @@ impl From<EventCancelable> for bool {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(JSTraceable, Copy, Clone, Debug, PartialEq, Eq)]
|
||||
#[derive(Clone, Copy, Debug, Eq, JSTraceable, PartialEq)]
|
||||
#[repr(u16)]
|
||||
#[derive(HeapSizeOf)]
|
||||
pub enum EventPhase {
|
||||
|
@ -363,7 +363,7 @@ pub enum EventPhase {
|
|||
///
|
||||
/// [msg]: https://doc.servo.org/script_traits/enum.ConstellationMsg.html#variant.KeyEvent
|
||||
///
|
||||
#[derive(JSTraceable, HeapSizeOf, Copy, Clone, PartialEq)]
|
||||
#[derive(Clone, Copy, HeapSizeOf, JSTraceable, PartialEq)]
|
||||
pub enum EventDefault {
|
||||
/// The default action of the event is allowed (constructor's default)
|
||||
Allowed,
|
||||
|
|
|
@ -43,10 +43,10 @@ header! { (LastEventId, "Last-Event-ID") => [String] }
|
|||
|
||||
const DEFAULT_RECONNECTION_TIME: u64 = 5000;
|
||||
|
||||
#[derive(JSTraceable, PartialEq, Copy, Clone, Debug, HeapSizeOf)]
|
||||
#[derive(Clone, Copy, Debug, HeapSizeOf, JSTraceable, PartialEq)]
|
||||
struct GenerationId(u32);
|
||||
|
||||
#[derive(JSTraceable, PartialEq, Copy, Clone, Debug, HeapSizeOf)]
|
||||
#[derive(Clone, Copy, Debug, HeapSizeOf, JSTraceable, PartialEq)]
|
||||
/// https://html.spec.whatwg.org/multipage/#dom-eventsource-readystate
|
||||
enum ReadyState {
|
||||
Connecting = 0,
|
||||
|
@ -535,7 +535,7 @@ impl Runnable for ReestablishConnectionRunnable {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(JSTraceable, HeapSizeOf)]
|
||||
#[derive(HeapSizeOf, JSTraceable)]
|
||||
pub struct EventSourceTimeoutCallback {
|
||||
#[ignore_heap_size_of = "Because it is non-owning"]
|
||||
event_source: Trusted<EventSource>,
|
||||
|
|
|
@ -44,7 +44,7 @@ use std::ops::{Deref, DerefMut};
|
|||
use std::ptr;
|
||||
use std::rc::Rc;
|
||||
|
||||
#[derive(PartialEq, Clone, JSTraceable)]
|
||||
#[derive(Clone, JSTraceable, PartialEq)]
|
||||
pub enum CommonEventHandler {
|
||||
EventHandler(Rc<EventHandlerNonNull>),
|
||||
ErrorEventHandler(Rc<OnErrorEventHandlerNonNull>),
|
||||
|
@ -61,14 +61,14 @@ impl CommonEventHandler {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(JSTraceable, Copy, Clone, PartialEq, HeapSizeOf)]
|
||||
#[derive(Clone, Copy, HeapSizeOf, JSTraceable, PartialEq)]
|
||||
pub enum ListenerPhase {
|
||||
Capturing,
|
||||
Bubbling,
|
||||
}
|
||||
|
||||
/// https://html.spec.whatwg.org/multipage/#internal-raw-uncompiled-handler
|
||||
#[derive(JSTraceable, Clone, PartialEq)]
|
||||
#[derive(Clone, JSTraceable, PartialEq)]
|
||||
struct InternalRawUncompiledHandler {
|
||||
source: DOMString,
|
||||
url: ServoUrl,
|
||||
|
@ -76,7 +76,7 @@ struct InternalRawUncompiledHandler {
|
|||
}
|
||||
|
||||
/// A representation of an event handler, either compiled or uncompiled raw source, or null.
|
||||
#[derive(JSTraceable, PartialEq, Clone)]
|
||||
#[derive(Clone, JSTraceable, PartialEq)]
|
||||
enum InlineEventListener {
|
||||
Uncompiled(InternalRawUncompiledHandler),
|
||||
Compiled(CommonEventHandler),
|
||||
|
@ -106,7 +106,7 @@ impl InlineEventListener {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(JSTraceable, Clone, PartialEq)]
|
||||
#[derive(Clone, JSTraceable, PartialEq)]
|
||||
enum EventListenerType {
|
||||
Additive(Rc<EventListener>),
|
||||
Inline(InlineEventListener),
|
||||
|
@ -228,7 +228,7 @@ struct EventListenerEntry {
|
|||
listener: EventListenerType
|
||||
}
|
||||
|
||||
#[derive(JSTraceable, HeapSizeOf)]
|
||||
#[derive(HeapSizeOf, JSTraceable)]
|
||||
/// A mix of potentially uncompiled and compiled event listeners of the same type.
|
||||
struct EventListeners(Vec<EventListenerEntry>);
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ use std::thread;
|
|||
use task_source::TaskSource;
|
||||
use task_source::file_reading::{FileReadingTaskSource, FileReadingRunnable, FileReadingTask};
|
||||
|
||||
#[derive(PartialEq, Clone, Copy, JSTraceable, HeapSizeOf)]
|
||||
#[derive(Clone, Copy, HeapSizeOf, JSTraceable, PartialEq)]
|
||||
pub enum FileReaderFunction {
|
||||
ReadAsText,
|
||||
ReadAsDataUrl,
|
||||
|
@ -66,11 +66,11 @@ impl ReadMetaData {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(PartialEq, Clone, Copy, JSTraceable, HeapSizeOf)]
|
||||
#[derive(Clone, Copy, HeapSizeOf, JSTraceable, PartialEq)]
|
||||
pub struct GenerationId(u32);
|
||||
|
||||
#[repr(u16)]
|
||||
#[derive(Copy, Clone, Debug, PartialEq, JSTraceable, HeapSizeOf)]
|
||||
#[derive(Clone, Copy, Debug, HeapSizeOf, JSTraceable, PartialEq)]
|
||||
pub enum FileReaderReadyState {
|
||||
Empty = FileReaderConstants::EMPTY,
|
||||
Loading = FileReaderConstants::LOADING,
|
||||
|
|
|
@ -26,7 +26,7 @@ pub struct Headers {
|
|||
}
|
||||
|
||||
// https://fetch.spec.whatwg.org/#concept-headers-guard
|
||||
#[derive(Copy, Clone, JSTraceable, HeapSizeOf, PartialEq)]
|
||||
#[derive(Clone, Copy, HeapSizeOf, JSTraceable, PartialEq)]
|
||||
pub enum Guard {
|
||||
Immutable,
|
||||
Request,
|
||||
|
|
|
@ -29,7 +29,7 @@ use std::cell::Cell;
|
|||
use std::default::Default;
|
||||
use style::element_state::*;
|
||||
|
||||
#[derive(JSTraceable, PartialEq, Copy, Clone)]
|
||||
#[derive(Clone, Copy, JSTraceable, PartialEq)]
|
||||
#[derive(HeapSizeOf)]
|
||||
enum ButtonType {
|
||||
Submit,
|
||||
|
|
|
@ -42,7 +42,7 @@ const DEFAULT_WIDTH: u32 = 300;
|
|||
const DEFAULT_HEIGHT: u32 = 150;
|
||||
|
||||
#[must_root]
|
||||
#[derive(JSTraceable, Clone, HeapSizeOf)]
|
||||
#[derive(Clone, HeapSizeOf, JSTraceable)]
|
||||
pub enum CanvasContext {
|
||||
Context2d(JS<CanvasRenderingContext2D>),
|
||||
WebGL(JS<WebGLRenderingContext>),
|
||||
|
|
|
@ -26,7 +26,7 @@ pub trait CollectionFilter : JSTraceable {
|
|||
// An optional u32, using maxint to represent None.
|
||||
// It would be nicer just to use Option<u32> for this, but that would produce word
|
||||
// alignment issues since Option<u32> uses 33 bits.
|
||||
#[derive(Clone, Copy, JSTraceable, HeapSizeOf)]
|
||||
#[derive(Clone, Copy, HeapSizeOf, JSTraceable)]
|
||||
struct OptionU32 {
|
||||
bits: u32,
|
||||
}
|
||||
|
@ -119,7 +119,7 @@ impl HTMLCollection {
|
|||
-> Root<HTMLCollection> {
|
||||
// case 1
|
||||
if qualified_name == local_name!("*") {
|
||||
#[derive(JSTraceable, HeapSizeOf)]
|
||||
#[derive(HeapSizeOf, JSTraceable)]
|
||||
struct AllFilter;
|
||||
impl CollectionFilter for AllFilter {
|
||||
fn filter(&self, _elem: &Element, _root: &Node) -> bool {
|
||||
|
@ -129,7 +129,7 @@ impl HTMLCollection {
|
|||
return HTMLCollection::create(window, root, box AllFilter);
|
||||
}
|
||||
|
||||
#[derive(JSTraceable, HeapSizeOf)]
|
||||
#[derive(HeapSizeOf, JSTraceable)]
|
||||
struct HtmlDocumentFilter {
|
||||
qualified_name: LocalName,
|
||||
ascii_lower_qualified_name: LocalName,
|
||||
|
@ -169,7 +169,7 @@ impl HTMLCollection {
|
|||
}
|
||||
|
||||
pub fn by_qual_tag_name(window: &Window, root: &Node, qname: QualName) -> Root<HTMLCollection> {
|
||||
#[derive(JSTraceable, HeapSizeOf)]
|
||||
#[derive(HeapSizeOf, JSTraceable)]
|
||||
struct TagNameNSFilter {
|
||||
qname: QualName
|
||||
}
|
||||
|
@ -193,7 +193,7 @@ impl HTMLCollection {
|
|||
|
||||
pub fn by_atomic_class_name(window: &Window, root: &Node, classes: Vec<Atom>)
|
||||
-> Root<HTMLCollection> {
|
||||
#[derive(JSTraceable, HeapSizeOf)]
|
||||
#[derive(HeapSizeOf, JSTraceable)]
|
||||
struct ClassNameFilter {
|
||||
classes: Vec<Atom>
|
||||
}
|
||||
|
@ -212,7 +212,7 @@ impl HTMLCollection {
|
|||
}
|
||||
|
||||
pub fn children(window: &Window, root: &Node) -> Root<HTMLCollection> {
|
||||
#[derive(JSTraceable, HeapSizeOf)]
|
||||
#[derive(HeapSizeOf, JSTraceable)]
|
||||
struct ElementChildFilter;
|
||||
impl CollectionFilter for ElementChildFilter {
|
||||
fn filter(&self, elem: &Element, root: &Node) -> bool {
|
||||
|
|
|
@ -43,7 +43,7 @@ impl HTMLDataListElement {
|
|||
impl HTMLDataListElementMethods for HTMLDataListElement {
|
||||
// https://html.spec.whatwg.org/multipage/#dom-datalist-options
|
||||
fn Options(&self) -> Root<HTMLCollection> {
|
||||
#[derive(JSTraceable, HeapSizeOf)]
|
||||
#[derive(HeapSizeOf, JSTraceable)]
|
||||
struct HTMLDataListOptionsFilter;
|
||||
impl CollectionFilter for HTMLDataListOptionsFilter {
|
||||
fn filter(&self, elem: &Element, _root: &Node) -> bool {
|
||||
|
|
|
@ -52,7 +52,7 @@ impl HTMLFieldSetElement {
|
|||
impl HTMLFieldSetElementMethods for HTMLFieldSetElement {
|
||||
// https://html.spec.whatwg.org/multipage/#dom-fieldset-elements
|
||||
fn Elements(&self) -> Root<HTMLCollection> {
|
||||
#[derive(JSTraceable, HeapSizeOf)]
|
||||
#[derive(HeapSizeOf, JSTraceable)]
|
||||
struct ElementsFilter;
|
||||
impl CollectionFilter for ElementsFilter {
|
||||
fn filter<'a>(&self, elem: &'a Element, _root: &'a Node) -> bool {
|
||||
|
|
|
@ -59,7 +59,7 @@ use style::attr::AttrValue;
|
|||
use style::str::split_html_space_chars;
|
||||
use task_source::TaskSource;
|
||||
|
||||
#[derive(JSTraceable, PartialEq, Clone, Copy, HeapSizeOf)]
|
||||
#[derive(Clone, Copy, HeapSizeOf, JSTraceable, PartialEq)]
|
||||
pub struct GenerationId(u32);
|
||||
|
||||
#[dom_struct]
|
||||
|
@ -172,7 +172,7 @@ impl HTMLFormElementMethods for HTMLFormElement {
|
|||
return elements;
|
||||
}
|
||||
|
||||
#[derive(JSTraceable, HeapSizeOf)]
|
||||
#[derive(HeapSizeOf, JSTraceable)]
|
||||
struct ElementsFilter {
|
||||
form: Root<HTMLFormElement>
|
||||
}
|
||||
|
@ -241,13 +241,13 @@ impl HTMLFormElementMethods for HTMLFormElement {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, HeapSizeOf, PartialEq)]
|
||||
#[derive(Clone, Copy, HeapSizeOf, PartialEq)]
|
||||
pub enum SubmittedFrom {
|
||||
FromForm,
|
||||
NotFromForm
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, HeapSizeOf)]
|
||||
#[derive(Clone, Copy, HeapSizeOf)]
|
||||
pub enum ResetFrom {
|
||||
FromForm,
|
||||
NotFromForm
|
||||
|
@ -674,14 +674,14 @@ impl HTMLFormElement {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(JSTraceable, HeapSizeOf, Clone)]
|
||||
#[derive(Clone, HeapSizeOf, JSTraceable)]
|
||||
pub enum FormDatumValue {
|
||||
#[allow(dead_code)]
|
||||
File(Root<File>),
|
||||
String(DOMString)
|
||||
}
|
||||
|
||||
#[derive(HeapSizeOf, JSTraceable, Clone)]
|
||||
#[derive(Clone, HeapSizeOf, JSTraceable)]
|
||||
pub struct FormDatum {
|
||||
pub ty: DOMString,
|
||||
pub name: DOMString,
|
||||
|
@ -701,14 +701,14 @@ impl FormDatum {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, HeapSizeOf)]
|
||||
#[derive(Clone, Copy, HeapSizeOf)]
|
||||
pub enum FormEncType {
|
||||
TextPlainEncoded,
|
||||
UrlEncoded,
|
||||
FormDataEncoded
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, HeapSizeOf)]
|
||||
#[derive(Clone, Copy, HeapSizeOf)]
|
||||
pub enum FormMethod {
|
||||
FormGet,
|
||||
FormPost,
|
||||
|
@ -759,7 +759,7 @@ impl FormSubmittableElement {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, HeapSizeOf)]
|
||||
#[derive(Clone, Copy, HeapSizeOf)]
|
||||
pub enum FormSubmitter<'a> {
|
||||
FormElement(&'a HTMLFormElement),
|
||||
InputElement(&'a HTMLInputElement),
|
||||
|
|
|
@ -10,7 +10,7 @@ use dom::node::Node;
|
|||
use dom_struct::dom_struct;
|
||||
use html5ever::{LocalName, Prefix};
|
||||
|
||||
#[derive(JSTraceable, HeapSizeOf)]
|
||||
#[derive(HeapSizeOf, JSTraceable)]
|
||||
pub enum HeadingLevel {
|
||||
Heading1,
|
||||
Heading2,
|
||||
|
|
|
@ -57,7 +57,7 @@ use style::context::ReflowGoal;
|
|||
use task_source::TaskSource;
|
||||
|
||||
bitflags! {
|
||||
#[derive(JSTraceable, HeapSizeOf)]
|
||||
#[derive(HeapSizeOf, JSTraceable)]
|
||||
flags SandboxAllowance: u8 {
|
||||
const ALLOW_NOTHING = 0x00,
|
||||
const ALLOW_SAME_ORIGIN = 0x01,
|
||||
|
|
|
@ -58,7 +58,7 @@ use std::sync::{Arc, Mutex};
|
|||
use style::attr::{AttrValue, LengthOrPercentageOrAuto};
|
||||
use task_source::TaskSource;
|
||||
|
||||
#[derive(Clone, Copy, JSTraceable, HeapSizeOf)]
|
||||
#[derive(Clone, Copy, HeapSizeOf, JSTraceable)]
|
||||
#[allow(dead_code)]
|
||||
enum State {
|
||||
Unavailable,
|
||||
|
@ -66,12 +66,12 @@ enum State {
|
|||
CompletelyAvailable,
|
||||
Broken,
|
||||
}
|
||||
#[derive(Copy, Clone, JSTraceable, HeapSizeOf)]
|
||||
#[derive(Clone, Copy, HeapSizeOf, JSTraceable)]
|
||||
enum ImageRequestPhase {
|
||||
Pending,
|
||||
Current
|
||||
}
|
||||
#[derive(JSTraceable, HeapSizeOf)]
|
||||
#[derive(HeapSizeOf, JSTraceable)]
|
||||
#[must_root]
|
||||
struct ImageRequest {
|
||||
state: State,
|
||||
|
@ -715,7 +715,7 @@ impl HTMLImageElement {
|
|||
|
||||
}
|
||||
|
||||
#[derive(JSTraceable, HeapSizeOf)]
|
||||
#[derive(HeapSizeOf, JSTraceable)]
|
||||
pub enum ImageElementMicrotask {
|
||||
StableStateUpdateImageDataTask {
|
||||
elem: Root<HTMLImageElement>,
|
||||
|
|
|
@ -60,7 +60,7 @@ const DEFAULT_SUBMIT_VALUE: &'static str = "Submit";
|
|||
const DEFAULT_RESET_VALUE: &'static str = "Reset";
|
||||
const PASSWORD_REPLACEMENT_CHAR: char = '●';
|
||||
|
||||
#[derive(JSTraceable, PartialEq, Copy, Clone)]
|
||||
#[derive(Clone, Copy, JSTraceable, PartialEq)]
|
||||
#[allow(dead_code)]
|
||||
#[derive(HeapSizeOf)]
|
||||
enum InputType {
|
||||
|
|
|
@ -38,7 +38,7 @@ use style::stylesheets::{CssRuleType, Stylesheet};
|
|||
use style_traits::PARSING_MODE_DEFAULT;
|
||||
use stylesheet_loader::{StylesheetLoader, StylesheetContextSource, StylesheetOwner};
|
||||
|
||||
#[derive(JSTraceable, PartialEq, Clone, Copy, HeapSizeOf)]
|
||||
#[derive(Clone, Copy, HeapSizeOf, JSTraceable, PartialEq)]
|
||||
pub struct RequestGenerationId(u32);
|
||||
|
||||
impl RequestGenerationId {
|
||||
|
|
|
@ -201,7 +201,7 @@ impl HTMLMediaElementContext {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(JSTraceable, HeapSizeOf)]
|
||||
#[derive(HeapSizeOf, JSTraceable)]
|
||||
pub struct VideoMedia {
|
||||
format: String,
|
||||
#[ignore_heap_size_of = "defined in time"]
|
||||
|
@ -794,7 +794,7 @@ impl VirtualMethods for HTMLMediaElement {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(JSTraceable, HeapSizeOf)]
|
||||
#[derive(HeapSizeOf, JSTraceable)]
|
||||
pub enum MediaElementMicrotask {
|
||||
ResourceSelectionTask {
|
||||
elem: Root<HTMLMediaElement>,
|
||||
|
|
|
@ -37,7 +37,7 @@ use std::iter;
|
|||
use style::attr::AttrValue;
|
||||
use style::element_state::*;
|
||||
|
||||
#[derive(JSTraceable, HeapSizeOf)]
|
||||
#[derive(HeapSizeOf, JSTraceable)]
|
||||
struct OptionsFilter;
|
||||
impl CollectionFilter for OptionsFilter {
|
||||
fn filter<'a>(&self, elem: &'a Element, root: &'a Node) -> bool {
|
||||
|
|
|
@ -36,7 +36,7 @@ pub struct HTMLTableElement {
|
|||
}
|
||||
|
||||
#[allow(unrooted_must_root)]
|
||||
#[derive(JSTraceable, HeapSizeOf)]
|
||||
#[derive(HeapSizeOf, JSTraceable)]
|
||||
struct TableRowFilter {
|
||||
sections: Vec<JS<Node>>,
|
||||
}
|
||||
|
|
|
@ -149,7 +149,7 @@ pub struct Node {
|
|||
|
||||
bitflags! {
|
||||
#[doc = "Flags for node items."]
|
||||
#[derive(JSTraceable, HeapSizeOf)]
|
||||
#[derive(HeapSizeOf, JSTraceable)]
|
||||
pub flags NodeFlags: u16 {
|
||||
#[doc = "Specifies whether this node is in a document."]
|
||||
const IS_IN_DOC = 1 << 0,
|
||||
|
@ -203,7 +203,7 @@ impl Drop for Node {
|
|||
/// suppress observers flag
|
||||
/// https://dom.spec.whatwg.org/#concept-node-insert
|
||||
/// https://dom.spec.whatwg.org/#concept-node-remove
|
||||
#[derive(Copy, Clone, HeapSizeOf)]
|
||||
#[derive(Clone, Copy, HeapSizeOf)]
|
||||
enum SuppressObserver {
|
||||
Suppressed,
|
||||
Unsuppressed
|
||||
|
@ -1368,7 +1368,7 @@ impl Iterator for TreeIterator {
|
|||
}
|
||||
|
||||
/// Specifies whether children must be recursively cloned or not.
|
||||
#[derive(Copy, Clone, PartialEq, HeapSizeOf)]
|
||||
#[derive(Clone, Copy, HeapSizeOf, PartialEq)]
|
||||
pub enum CloneChildrenFlag {
|
||||
CloneChildren,
|
||||
DoNotCloneChildren
|
||||
|
@ -2531,7 +2531,7 @@ impl VirtualMethods for Node {
|
|||
}
|
||||
|
||||
/// A summary of the changes that happened to a node.
|
||||
#[derive(Copy, Clone, PartialEq, HeapSizeOf)]
|
||||
#[derive(Clone, Copy, HeapSizeOf, PartialEq)]
|
||||
pub enum NodeDamage {
|
||||
/// The node's `style` attribute changed.
|
||||
NodeStyleDamaged,
|
||||
|
|
|
@ -12,7 +12,7 @@ use dom::window::Window;
|
|||
use dom_struct::dom_struct;
|
||||
use std::cell::Cell;
|
||||
|
||||
#[derive(JSTraceable, HeapSizeOf)]
|
||||
#[derive(HeapSizeOf, JSTraceable)]
|
||||
#[must_root]
|
||||
pub enum NodeListType {
|
||||
Simple(Vec<JS<Node>>),
|
||||
|
@ -109,7 +109,7 @@ impl NodeList {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(JSTraceable, HeapSizeOf)]
|
||||
#[derive(HeapSizeOf, JSTraceable)]
|
||||
#[must_root]
|
||||
pub struct ChildrenList {
|
||||
node: JS<Node>,
|
||||
|
|
|
@ -467,7 +467,7 @@ pub enum PaintWorkletTask {
|
|||
/// https://drafts.css-houdini.org/css-paint-api/#paint-definition
|
||||
/// This type is dangerous, because it contains uboxed `Heap<JSVal>` values,
|
||||
/// which can't be moved.
|
||||
#[derive(JSTraceable, HeapSizeOf)]
|
||||
#[derive(HeapSizeOf, JSTraceable)]
|
||||
#[must_root]
|
||||
struct PaintDefinition {
|
||||
class_constructor: Heap<JSVal>,
|
||||
|
|
|
@ -50,7 +50,7 @@ pub enum MixedMessage {
|
|||
FromTimeoutThread(())
|
||||
}
|
||||
|
||||
#[derive(JSTraceable, Clone)]
|
||||
#[derive(Clone, JSTraceable)]
|
||||
pub struct ServiceWorkerChan {
|
||||
pub sender: Sender<ServiceWorkerScriptMsg>
|
||||
}
|
||||
|
|
|
@ -495,7 +495,7 @@ fn run(sink: Sink,
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(JSTraceable, HeapSizeOf, Default)]
|
||||
#[derive(Default, HeapSizeOf, JSTraceable)]
|
||||
struct ParseNodeData {
|
||||
contents: Option<ParseNode>,
|
||||
is_integration_point: bool,
|
||||
|
|
|
@ -738,7 +738,7 @@ fn insert(parent: &Node, reference_child: Option<&Node>, child: NodeOrText<JS<No
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(JSTraceable, HeapSizeOf)]
|
||||
#[derive(HeapSizeOf, JSTraceable)]
|
||||
#[must_root]
|
||||
pub struct Sink {
|
||||
base_url: ServoUrl,
|
||||
|
|
|
@ -723,7 +723,7 @@ impl TestBindingMethods for TestBinding {
|
|||
p.append_native_handler(&handler);
|
||||
return p;
|
||||
|
||||
#[derive(JSTraceable, HeapSizeOf)]
|
||||
#[derive(HeapSizeOf, JSTraceable)]
|
||||
struct SimpleHandler {
|
||||
#[ignore_heap_size_of = "Rc has unclear ownership semantics"]
|
||||
handler: Rc<SimpleCallback>,
|
||||
|
@ -804,7 +804,7 @@ impl TestBinding {
|
|||
pub unsafe fn condition_unsatisfied(_: *mut JSContext, _: HandleObject) -> bool { false }
|
||||
}
|
||||
|
||||
#[derive(JSTraceable, HeapSizeOf)]
|
||||
#[derive(HeapSizeOf, JSTraceable)]
|
||||
pub struct TestBindingCallback {
|
||||
#[ignore_heap_size_of = "unclear ownership semantics"]
|
||||
promise: TrustedPromise,
|
||||
|
|
|
@ -11,7 +11,7 @@ use dom::window::Window;
|
|||
use dom_struct::dom_struct;
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#validity-states
|
||||
#[derive(JSTraceable, HeapSizeOf)]
|
||||
#[derive(HeapSizeOf, JSTraceable)]
|
||||
#[allow(dead_code)]
|
||||
pub enum ValidityStatus {
|
||||
ValueMissing,
|
||||
|
|
|
@ -79,7 +79,7 @@ unsafe_no_jsmanaged_fields!(WebVRDisplayData);
|
|||
unsafe_no_jsmanaged_fields!(WebVRFrameData);
|
||||
unsafe_no_jsmanaged_fields!(WebVRLayer);
|
||||
|
||||
#[derive(Clone, Copy, PartialEq, Eq, HeapSizeOf)]
|
||||
#[derive(Clone, Copy, Eq, HeapSizeOf, PartialEq)]
|
||||
enum VRFrameDataStatus {
|
||||
Waiting,
|
||||
Synced,
|
||||
|
|
|
@ -44,7 +44,7 @@ const DEFAULT_DISABLED_GET_PARAMETER_NAMES: [GLenum; 1] = [
|
|||
];
|
||||
|
||||
/// WebGL features that are enabled/disabled by WebGL Extensions.
|
||||
#[derive(JSTraceable, HeapSizeOf)]
|
||||
#[derive(HeapSizeOf, JSTraceable)]
|
||||
struct WebGLExtensionFeatures {
|
||||
gl_extensions: HashSet<String>,
|
||||
disabled_tex_types: HashSet<GLenum>,
|
||||
|
@ -73,7 +73,7 @@ impl Default for WebGLExtensionFeatures {
|
|||
|
||||
/// Handles the list of implemented, supported and enabled WebGL extensions.
|
||||
#[must_root]
|
||||
#[derive(JSTraceable, HeapSizeOf)]
|
||||
#[derive(HeapSizeOf, JSTraceable)]
|
||||
pub struct WebGLExtensions {
|
||||
extensions: DOMRefCell<HashMap<String, Box<WebGLExtensionWrapper>>>,
|
||||
features: DOMRefCell<WebGLExtensionFeatures>,
|
||||
|
@ -223,7 +223,7 @@ impl WebGLExtensions {
|
|||
}
|
||||
|
||||
// Helper structs
|
||||
#[derive(JSTraceable, HeapSizeOf, PartialEq, Eq, Hash)]
|
||||
#[derive(Eq, Hash, HeapSizeOf, JSTraceable, PartialEq)]
|
||||
struct TexFormatType(u32, u32);
|
||||
|
||||
type WebGLQueryParameterFunc = Fn(*mut JSContext, &WebGLRenderingContext)
|
||||
|
|
|
@ -27,7 +27,7 @@ pub trait WebGLExtensionWrapper: JSTraceable + HeapSizeOf {
|
|||
}
|
||||
|
||||
#[must_root]
|
||||
#[derive(JSTraceable, HeapSizeOf)]
|
||||
#[derive(HeapSizeOf, JSTraceable)]
|
||||
pub struct TypedWebGLExtensionWrapper<T: WebGLExtension> {
|
||||
extension: MutNullableJS<T::Extension>
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderi
|
|||
/// with gl constants.
|
||||
macro_rules! type_safe_wrapper {
|
||||
($name: ident, $($variant:ident => $mod:ident::$constant:ident, )+) => {
|
||||
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, JSTraceable, HeapSizeOf)]
|
||||
#[derive(Clone, Copy, Debug, Eq, Hash, HeapSizeOf, JSTraceable, PartialEq)]
|
||||
#[repr(u32)]
|
||||
pub enum $name {
|
||||
$(
|
||||
|
|
|
@ -19,7 +19,7 @@ use dom_struct::dom_struct;
|
|||
use std::cell::Cell;
|
||||
|
||||
#[must_root]
|
||||
#[derive(JSTraceable, Clone, HeapSizeOf)]
|
||||
#[derive(Clone, HeapSizeOf, JSTraceable)]
|
||||
enum WebGLFramebufferAttachment {
|
||||
Renderbuffer(JS<WebGLRenderbuffer>),
|
||||
Texture { texture: JS<WebGLTexture>, level: i32 },
|
||||
|
|
|
@ -18,7 +18,7 @@ use dom_struct::dom_struct;
|
|||
use std::cell::Cell;
|
||||
use std::sync::{ONCE_INIT, Once};
|
||||
|
||||
#[derive(Clone, Copy, PartialEq, Debug, JSTraceable, HeapSizeOf)]
|
||||
#[derive(Clone, Copy, Debug, HeapSizeOf, JSTraceable, PartialEq)]
|
||||
pub enum ShaderCompilationStatus {
|
||||
NotCompiled,
|
||||
Succeeded,
|
||||
|
|
|
@ -382,7 +382,7 @@ impl Drop for WebGLTexture {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, PartialEq, Debug, JSTraceable, HeapSizeOf)]
|
||||
#[derive(Clone, Copy, Debug, HeapSizeOf, JSTraceable, PartialEq)]
|
||||
pub struct ImageInfo {
|
||||
width: u32,
|
||||
height: u32,
|
||||
|
|
|
@ -42,7 +42,7 @@ use std::thread;
|
|||
use task_source::TaskSource;
|
||||
use task_source::networking::NetworkingTaskSource;
|
||||
|
||||
#[derive(JSTraceable, PartialEq, Copy, Clone, Debug, HeapSizeOf)]
|
||||
#[derive(Clone, Copy, Debug, HeapSizeOf, JSTraceable, PartialEq)]
|
||||
enum WebSocketRequestState {
|
||||
Connecting = 0,
|
||||
Open = 1,
|
||||
|
|
|
@ -130,7 +130,7 @@ use webrender_api::ClipId;
|
|||
use webvr_traits::WebVRMsg;
|
||||
|
||||
/// Current state of the window object
|
||||
#[derive(JSTraceable, Copy, Clone, Debug, PartialEq, HeapSizeOf)]
|
||||
#[derive(Clone, Copy, Debug, HeapSizeOf, JSTraceable, PartialEq)]
|
||||
enum WindowState {
|
||||
Alive,
|
||||
Zombie, // Pipeline is closed, but the window hasn't been GCed yet.
|
||||
|
|
|
@ -152,7 +152,7 @@ impl WorkletMethods for Worklet {
|
|||
}
|
||||
|
||||
/// A guid for worklets.
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, JSTraceable)]
|
||||
#[derive(Clone, Copy, Debug, Eq, Hash, JSTraceable, PartialEq)]
|
||||
pub struct WorkletId(Uuid);
|
||||
|
||||
known_heap_size!(0, WorkletId);
|
||||
|
@ -656,7 +656,7 @@ impl WorkletThread {
|
|||
}
|
||||
|
||||
/// An executor of worklet tasks
|
||||
#[derive(Clone, JSTraceable, HeapSizeOf)]
|
||||
#[derive(Clone, HeapSizeOf, JSTraceable)]
|
||||
pub struct WorkletExecutor {
|
||||
worklet_id: WorkletId,
|
||||
#[ignore_heap_size_of = "channels are hard"]
|
||||
|
|
|
@ -74,7 +74,7 @@ use time;
|
|||
use timers::{OneshotTimerCallback, OneshotTimerHandle};
|
||||
use url::Position;
|
||||
|
||||
#[derive(JSTraceable, PartialEq, Copy, Clone, HeapSizeOf)]
|
||||
#[derive(Clone, Copy, HeapSizeOf, JSTraceable, PartialEq)]
|
||||
enum XMLHttpRequestState {
|
||||
Unsent = 0,
|
||||
Opened = 1,
|
||||
|
@ -83,7 +83,7 @@ enum XMLHttpRequestState {
|
|||
Done = 4,
|
||||
}
|
||||
|
||||
#[derive(JSTraceable, PartialEq, Clone, Copy, HeapSizeOf)]
|
||||
#[derive(Clone, Copy, HeapSizeOf, JSTraceable, PartialEq)]
|
||||
pub struct GenerationId(u32);
|
||||
|
||||
/// Closure of required data for each async network event that comprises the
|
||||
|
@ -1335,7 +1335,7 @@ impl XMLHttpRequest {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(JSTraceable, HeapSizeOf)]
|
||||
#[derive(HeapSizeOf, JSTraceable)]
|
||||
pub struct XHRTimeoutCallback {
|
||||
#[ignore_heap_size_of = "Because it is non-owning"]
|
||||
xhr: Trusted<XMLHttpRequest>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue