servo/components
Manish Goregaokar ad198993b1 Assert that DOM structs have the correct first field
DOM structs embed their parent type as their first field. This
introduces a `.parent()` method to the DOM struct that returns its first
field, and codegens a type assert that ensures that `.parent()` returns
the parent struct.

This generates:

On `#[dom_struct]`:

```rust
impl HasParent for Type {
    type Parent = ParentType;
    fn as_parent(&self) -> ParentType {
        &self.first_field
    }
}
```

In the codegen files:

```rust
impl Type {
    fn __assert_parent_type(&self) {
        let _: &ParentType = self.as_parent();
    }
}
````
2018-07-03 09:39:29 -07:00
..
allocator Upgrade to rustc 1.28.0-nightly (b68432d56 2018-06-12) 2018-06-14 04:19:17 +02:00
atoms atoms: Add scroll-position as a static atom. 2018-06-02 12:19:32 +02:00
bluetooth move top_level_browsing_context_id out of embedder msg 2018-05-23 21:46:05 +08:00
bluetooth_traits Automatically provide a resource reader for tests 2018-04-30 22:19:33 +08:00
canvas Update WR (transaction API change) 2018-06-20 09:15:31 +10:00
canvas_traits Remove components/nonzero, use std::num::NonZero instead 2018-06-16 00:14:41 +02:00
compositing Remove components/nonzero, use std::num::NonZero instead 2018-06-16 00:14:41 +02:00
config Automatically provide a resource reader for tests 2018-04-30 22:19:33 +08:00
constellation Auto merge of #20891 - KiChjang:reversed-bc-iter, r=asajeffrey 2018-06-13 15:06:46 -04:00
debugger Bump env_logger to 0.5 and log to 0.4 in every servo crate 2018-03-28 19:50:58 +02:00
deny_public_fields Update Webrender 2018-04-25 10:25:21 +02:00
devtools Bump env_logger to 0.5 and log to 0.4 in every servo crate 2018-03-28 19:50:58 +02:00
devtools_traits Bump ipc-channel and bincode 2018-03-21 13:05:47 +01:00
dom_struct Assert that DOM structs have the correct first field 2018-07-03 09:39:29 -07:00
domobject_derive Update Webrender 2018-04-25 10:25:21 +02:00
embedder_traits improve spec compliance of window.close 2018-06-04 15:02:23 +08:00
fallible Update smallvec to 0.6 2017-12-05 12:03:20 +01:00
geometry alias some euclid types 2018-03-16 14:34:29 +08:00
gfx Update WR (transaction API change) 2018-06-20 09:15:31 +10:00
gfx_traits Update WebRender 2018-02-06 15:10:35 +01:00
hashglobe Bump ipc-channel and bincode 2018-03-21 13:05:47 +01:00
jstraceable_derive Update Webrender 2018-04-25 10:25:21 +02:00
layout Auto merge of #20892 - gw3583:update-wr, r=mbrubeck 2018-06-26 17:27:31 -04:00
layout_thread layout: script: Fix build. 2018-06-23 20:34:10 +02:00
layout_traits Bump ipc-channel and bincode 2018-03-21 13:05:47 +01:00
malloc_size_of Update WR (transaction API change) 2018-06-20 09:15:31 +10:00
malloc_size_of_derive Update Webrender 2018-04-25 10:25:21 +02:00
metrics added spec comments 2018-04-11 21:29:03 +01:00
msg Remove components/nonzero, use std::num::NonZero instead 2018-06-16 00:14:41 +02:00
net Auto merge of #20892 - gw3583:update-wr, r=mbrubeck 2018-06-26 17:27:31 -04:00
net_traits move msg to embedder_traits, use in script, handle send error in embedder 2018-05-23 21:45:57 +08:00
profile Bump env_logger to 0.5 and log to 0.4 in every servo crate 2018-03-28 19:50:58 +02:00
profile_traits Measure cache memory usage (#19251): 2018-04-01 13:30:57 -04:00
rand Bump env_logger to 0.5 and log to 0.4 in every servo crate 2018-03-28 19:50:58 +02:00
range Replace all uses of the heapsize crate with malloc_size_of. 2017-10-18 22:20:37 +11:00
remutex Remove components/nonzero, use std::num::NonZero instead 2018-06-16 00:14:41 +02:00
script Assert that DOM structs have the correct first field 2018-07-03 09:39:29 -07:00
script_layout_interface Add unique canvas IDs to all canvas operations. 2018-04-02 22:02:22 -04:00
script_plugins Upgrade to rustc 1.28.0-nightly (524ad9b9e 2018-05-29) 2018-05-30 10:50:59 +02:00
script_traits improve spec compliance of window.close 2018-06-04 15:02:23 +08:00
selectors style: Add diagnostics. 2018-06-12 12:15:16 -07:00
servo Remove components/nonzero, use std::num::NonZero instead 2018-06-16 00:14:41 +02:00
servo_arc style: Fix tidy issues and Servo build. 2018-04-29 05:09:43 +02:00
size_of_test Add size_of_test crate 2017-05-16 10:12:51 +02:00
style style: Fix tidy. 2018-06-23 20:34:10 +02:00
style_derive style: Better debugging for media-query related code and ua-cache. 2018-06-23 20:37:16 +02:00
style_traits style: Remove PropertyId::name. 2018-06-12 12:15:12 -07:00
url Fix building servo_url by itself 2018-04-19 17:01:14 +02:00
webdriver_server Bump env_logger to 0.5 and log to 0.4 in every servo crate 2018-03-28 19:50:58 +02:00
webvr Bump env_logger to 0.5 and log to 0.4 in every servo crate 2018-03-28 19:50:58 +02:00
webvr_traits Bump ipc-channel and bincode 2018-03-21 13:05:47 +01:00