aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Cargo.lock20
-rw-r--r--components/config/opts.rs3
-rw-r--r--components/layout/Cargo.toml2
-rw-r--r--components/layout/block.rs7
-rw-r--r--components/layout/construct.rs20
-rw-r--r--components/layout/inline.rs2
-rw-r--r--components/layout_thread/Cargo.toml2
-rw-r--r--components/script/Cargo.toml2
-rw-r--r--components/script/dom/beforeunloadevent.rs10
-rw-r--r--components/script/dom/document.rs14
-rw-r--r--components/script/dom/event.rs407
-rw-r--r--components/script/dom/eventdispatcher.rs223
-rw-r--r--components/script/dom/eventtarget.rs7
-rw-r--r--components/script/dom/focusevent.rs7
-rw-r--r--components/script/dom/globalscope.rs3
-rw-r--r--components/script/dom/hashchangeevent.rs14
-rw-r--r--components/script/dom/htmlscriptelement.rs3
-rw-r--r--components/script/dom/mod.rs1
-rw-r--r--components/script/dom/pagetransitionevent.rs14
-rw-r--r--components/script/dom/popstateevent.rs14
-rw-r--r--components/script/dom/transitionevent.rs10
-rw-r--r--components/script/dom/webidls/BeforeUnloadEvent.webidl2
-rw-r--r--components/script/dom/webidls/FocusEvent.webidl3
-rw-r--r--components/script/dom/webidls/HashChangeEvent.webidl3
-rw-r--r--components/script/dom/webidls/Location.webidl2
-rw-r--r--components/script/dom/webidls/MouseEvent.webidl3
-rw-r--r--components/script/dom/webidls/PageTransitionEvent.webidl3
-rw-r--r--components/script/dom/webidls/PopStateEvent.webidl3
-rw-r--r--components/script/dom/worker.rs3
-rw-r--r--components/script/script_thread.rs2
-rw-r--r--components/script/test.rs1
-rw-r--r--components/script_layout_interface/Cargo.toml2
-rw-r--r--components/style/Cargo.toml2
-rw-r--r--components/style/build_gecko.rs5
-rw-r--r--components/style/gecko/media_queries.rs13
-rw-r--r--components/style/gecko_bindings/structs_debug.rs769
-rw-r--r--components/style/gecko_bindings/structs_release.rs752
-rw-r--r--components/style/properties/longhand/box.mako.rs5
-rw-r--r--components/style/properties/properties.mako.rs4
-rw-r--r--components/style/properties/shorthand/font.mako.rs23
-rw-r--r--ports/geckolib/Cargo.toml2
-rw-r--r--tests/compiletest/plugin/compile-fail/trustedpromise_mustnot_deriveclone.rs18
-rw-r--r--tests/heartbeats/characterize.py5
-rw-r--r--tests/heartbeats/characterize_android.py5
-rw-r--r--tests/unit/style/Cargo.toml2
-rw-r--r--tests/unit/stylo/Cargo.toml2
-rw-r--r--tests/wpt/harness/wptrunner/browsers/servo.py60
-rw-r--r--tests/wpt/harness/wptrunner/browsers/servodriver.py56
-rw-r--r--tests/wpt/harness/wptrunner/executors/executorservo.py22
-rw-r--r--tests/wpt/harness/wptrunner/webdriver_server.py7
-rw-r--r--tests/wpt/harness/wptrunner/wptcommandline.py4
-rw-r--r--tests/wpt/metadata-css/css-flexbox-1_dev/html/display_inline-flex_exist.htm.ini5
-rw-r--r--tests/wpt/metadata-css/css-flexbox-1_dev/html/flexbox_computedstyle_display-inline.htm.ini5
-rw-r--r--tests/wpt/metadata-css/css-flexbox-1_dev/html/flexbox_inline.htm.ini3
-rw-r--r--tests/wpt/metadata-css/css-flexbox-1_dev/html/ttwf-reftest-flex-inline.htm.ini3
-rw-r--r--tests/wpt/metadata/dom/events/EventTarget-dispatchEvent.html.ini3
-rw-r--r--tests/wpt/metadata/dom/nodes/Document-createEvent.html.ini18
-rw-r--r--tests/wpt/metadata/webgl/conformance-1.0.3/conformance/canvas/to-data-url-test.html.ini1
-rw-r--r--tests/wpt/metadata/webgl/conformance-1.0.3/conformance/context/constants-and-properties.html.ini1
-rw-r--r--tests/wpt/metadata/webgl/conformance-1.0.3/conformance/context/context-attribute-preserve-drawing-buffer.html.ini1
-rw-r--r--tests/wpt/metadata/webgl/conformance-1.0.3/conformance/context/context-creation-and-destruction.html.ini1
-rw-r--r--tests/wpt/metadata/webgl/conformance-1.0.3/conformance/context/context-creation.html.ini1
-rw-r--r--tests/wpt/metadata/webgl/conformance-1.0.3/conformance/context/context-hidden-alpha.html.ini1
-rw-r--r--tests/wpt/metadata/webgl/conformance-1.0.3/conformance/context/context-lost-restored.html.ini1
-rw-r--r--tests/wpt/metadata/webgl/conformance-1.0.3/conformance/context/context-release-upon-reload.html.ini1
-rw-r--r--tests/wpt/metadata/webgl/conformance-1.0.3/conformance/context/context-release-with-workers.html.ini1
-rw-r--r--tests/wpt/metadata/webgl/conformance-1.0.3/conformance/context/context-type-test.html.ini1
-rw-r--r--tests/wpt/metadata/webgl/conformance-1.0.3/conformance/extensions/angle-instanced-arrays-out-of-bounds.html.ini1
-rw-r--r--tests/wpt/metadata/webgl/conformance-1.0.3/conformance/extensions/angle-instanced-arrays.html.ini1
-rw-r--r--tests/wpt/metadata/workers/semantics/interface-objects/002.worker.js.ini14
-rw-r--r--tests/wpt/mozilla/tests/mozilla/interfaces.worker.js5
-rw-r--r--tests/wpt/web-platform-tests/workers/semantics/interface-objects/002.worker.js1
72 files changed, 1773 insertions, 864 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 0cc1749567c..eac25e16596 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -904,7 +904,7 @@ dependencies = [
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"num_cpus 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
- "selectors 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "selectors 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)",
"servo_url 0.0.1",
"style 0.0.1",
"style_traits 0.0.1",
@@ -1325,7 +1325,7 @@ dependencies = [
"rayon 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
"script_layout_interface 0.0.1",
"script_traits 0.0.1",
- "selectors 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "selectors 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.8.20 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 0.8.20 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 0.8.4 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1373,7 +1373,7 @@ dependencies = [
"script 0.0.1",
"script_layout_interface 0.0.1",
"script_traits 0.0.1",
- "selectors 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "selectors 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 0.8.20 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 0.8.4 (registry+https://github.com/rust-lang/crates.io-index)",
"servo_config 0.0.1",
@@ -2304,7 +2304,7 @@ dependencies = [
"rustc-serialize 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)",
"script_layout_interface 0.0.1",
"script_traits 0.0.1",
- "selectors 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "selectors 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.8.20 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 0.8.4 (registry+https://github.com/rust-lang/crates.io-index)",
"servo_atoms 0.0.1",
@@ -2349,7 +2349,7 @@ dependencies = [
"profile_traits 0.0.1",
"range 0.0.1",
"script_traits 0.0.1",
- "selectors 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "selectors 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)",
"servo_atoms 0.0.1",
"servo_url 0.0.1",
"style 0.0.1",
@@ -2400,7 +2400,7 @@ dependencies = [
[[package]]
name = "selectors"
-version = "0.15.0"
+version = "0.15.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2775,7 +2775,7 @@ dependencies = [
"rayon 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
"regex 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)",
- "selectors 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "selectors 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.8.20 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 0.8.20 (registry+https://github.com/rust-lang/crates.io-index)",
"servo_atoms 0.0.1",
@@ -2801,7 +2801,7 @@ dependencies = [
"parking_lot 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"rayon 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)",
- "selectors 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "selectors 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)",
"servo_atoms 0.0.1",
"servo_config 0.0.1",
"servo_url 0.0.1",
@@ -2838,7 +2838,7 @@ dependencies = [
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"num_cpus 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
- "selectors 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "selectors 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)",
"servo_url 0.0.1",
"style 0.0.1",
"style_traits 0.0.1",
@@ -3567,7 +3567,7 @@ dependencies = [
"checksum rustc-serialize 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)" = "237546c689f20bb44980270c73c3b9edd0891c1be49cc1274406134a66d3957b"
"checksum rustc_version 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "c5f5376ea5e30ce23c03eb77cbe4962b988deead10910c372b226388b594c084"
"checksum scoped_threadpool 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "3ef399c8893e8cb7aa9696e895427fab3a6bf265977bb96e126f24ddd2cda85a"
-"checksum selectors 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)" = "75b127ac14249f6ce720277f6a163b3837706e9dc1ad4e2948db55f262f11a97"
+"checksum selectors 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)" = "966334243238d1ef939c51576c55ffd3fd32245bd603a45f9dfdb3439a26e9a7"
"checksum semver 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)" = "d4f410fedcf71af0345d7607d246e7ad15faaadd49d240ee3b24e5dc21a820ac"
"checksum semver 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2d5b7638a1f03815d94e88cb3b3c08e87f0db4d683ef499d1836aaf70a45623f"
"checksum serde 0.8.20 (registry+https://github.com/rust-lang/crates.io-index)" = "793aa8d4a777e46a68bbf88998cd957e638427ba5bfb0de22c92ff277b65bd21"
diff --git a/components/config/opts.rs b/components/config/opts.rs
index df2bb2e041e..4abcf1f8421 100644
--- a/components/config/opts.rs
+++ b/components/config/opts.rs
@@ -573,8 +573,6 @@ pub fn from_cmdline_args(args: &[String]) -> ArgumentParsingResult {
let (app_name, args) = args.split_first().unwrap();
let mut opts = Options::new();
- opts.optflag("c", "cpu", "CPU painting");
- opts.optflag("g", "gpu", "GPU painting");
opts.optopt("o", "output", "Output file", "output.png");
opts.optopt("s", "size", "Size of tiles", "512");
opts.optopt("", "device-pixel-ratio", "Device pixels per px", "");
@@ -620,7 +618,6 @@ pub fn from_cmdline_args(args: &[String]) -> ArgumentParsingResult {
opts.optmulti("", "pref",
"A preference to set to enable", "dom.mozbrowser.enabled");
opts.optflag("b", "no-native-titlebar", "Do not use native titlebar");
- opts.optflag("w", "webrender", "Use webrender backend");
opts.optopt("G", "graphics", "Select graphics backend (gl or es2)", "gl");
opts.optopt("", "config-dir",
"config directory following xdg spec on linux platform", "");
diff --git a/components/layout/Cargo.toml b/components/layout/Cargo.toml
index eb1c968b581..8a782d1ae77 100644
--- a/components/layout/Cargo.toml
+++ b/components/layout/Cargo.toml
@@ -35,7 +35,7 @@ range = {path = "../range"}
rayon = "0.6"
script_layout_interface = {path = "../script_layout_interface"}
script_traits = {path = "../script_traits"}
-selectors = "0.15"
+selectors = "0.15.1"
serde = "0.8"
serde_derive = "0.8"
servo_geometry = {path = "../geometry"}
diff --git a/components/layout/block.rs b/components/layout/block.rs
index a4eb30ce606..7859cb9a9f8 100644
--- a/components/layout/block.rs
+++ b/components/layout/block.rs
@@ -567,7 +567,7 @@ impl BlockFlow {
} else {
BlockType::FloatNonReplaced
}
- } else if self.is_inline_block() {
+ } else if self.is_inline_block_or_inline_flex() {
if self.fragment.is_replaced() {
BlockType::InlineBlockReplaced
} else {
@@ -1558,8 +1558,9 @@ impl BlockFlow {
debug_assert_eq!(self.fragment.margin_box_inline_size(), self.base.position.size.inline);
}
- fn is_inline_block(&self) -> bool {
- self.fragment.style().get_box().display == display::T::inline_block
+ fn is_inline_block_or_inline_flex(&self) -> bool {
+ self.fragment.style().get_box().display == display::T::inline_block ||
+ self.fragment.style().get_box().display == display::T::inline_flex
}
/// Computes the content portion (only) of the intrinsic inline sizes of this flow. This is
diff --git a/components/layout/construct.rs b/components/layout/construct.rs
index 6671a07b4ad..95603f8dea7 100644
--- a/components/layout/construct.rs
+++ b/components/layout/construct.rs
@@ -937,9 +937,14 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
ConstructionResult::ConstructionItem(construction_item)
}
- fn build_fragment_for_inline_block(&mut self, node: &ConcreteThreadSafeLayoutNode)
- -> ConstructionResult {
- let block_flow_result = self.build_flow_for_block(node, None);
+ /// Build the fragment for an inline-block or inline-flex, based on the `display` flag
+ fn build_fragment_for_inline_block_or_inline_flex(&mut self, node: &ConcreteThreadSafeLayoutNode,
+ display: display::T) -> ConstructionResult {
+ let block_flow_result = match display {
+ display::T::inline_block => self.build_flow_for_block(node, None),
+ display::T::inline_flex => self.build_flow_for_flex(node, None),
+ _ => panic!("The flag should be inline-block or inline-flex")
+ };
let (block_flow, abs_descendants) = match block_flow_result {
ConstructionResult::Flow(block_flow, abs_descendants) => (block_flow, abs_descendants),
_ => unreachable!()
@@ -1548,7 +1553,8 @@ impl<'a, ConcreteThreadSafeLayoutNode> PostorderNodeMutTraversal<ConcreteThreadS
// Inline-block items contribute inline fragment construction results.
(display::T::inline_block, float::T::none, _) => {
- let construction_result = self.build_fragment_for_inline_block(node);
+ let construction_result = self.build_fragment_for_inline_block_or_inline_flex(node,
+ display::T::inline_block);
self.set_flow_construction_result(node, construction_result)
}
@@ -1597,6 +1603,12 @@ impl<'a, ConcreteThreadSafeLayoutNode> PostorderNodeMutTraversal<ConcreteThreadS
self.set_flow_construction_result(node, construction_result)
}
+ (display::T::inline_flex, _, _) => {
+ let construction_result = self.build_fragment_for_inline_block_or_inline_flex(node,
+ display::T::inline_flex);
+ self.set_flow_construction_result(node, construction_result)
+ }
+
// Block flows that are not floated contribute block flow construction results.
//
// TODO(pcwalton): Make this only trigger for blocks and handle the other `display`
diff --git a/components/layout/inline.rs b/components/layout/inline.rs
index 8a086d34320..d255b030963 100644
--- a/components/layout/inline.rs
+++ b/components/layout/inline.rs
@@ -1151,6 +1151,7 @@ impl InlineFlow {
match (display_value, vertical_align_value) {
(display::T::inline, vertical_align::T::top) |
(display::T::block, vertical_align::T::top) |
+ (display::T::inline_flex, vertical_align::T::top) |
(display::T::inline_block, vertical_align::T::top) if
inline_metrics.space_above_baseline >= Au(0) => {
*largest_block_size_for_top_fragments = max(
@@ -1159,6 +1160,7 @@ impl InlineFlow {
}
(display::T::inline, vertical_align::T::bottom) |
(display::T::block, vertical_align::T::bottom) |
+ (display::T::inline_flex, vertical_align::T::bottom) |
(display::T::inline_block, vertical_align::T::bottom) if
inline_metrics.space_below_baseline >= Au(0) => {
*largest_block_size_for_bottom_fragments = max(
diff --git a/components/layout_thread/Cargo.toml b/components/layout_thread/Cargo.toml
index e90892cf805..6bcd559be09 100644
--- a/components/layout_thread/Cargo.toml
+++ b/components/layout_thread/Cargo.toml
@@ -31,7 +31,7 @@ rayon = "0.6"
script = {path = "../script"}
script_layout_interface = {path = "../script_layout_interface"}
script_traits = {path = "../script_traits"}
-selectors = "0.15"
+selectors = "0.15.1"
serde_derive = "0.8"
serde_json = "0.8"
servo_config = {path = "../config"}
diff --git a/components/script/Cargo.toml b/components/script/Cargo.toml
index bcbfc949d7c..258ae0e1105 100644
--- a/components/script/Cargo.toml
+++ b/components/script/Cargo.toml
@@ -70,7 +70,7 @@ regex = "0.2"
rustc-serialize = "0.3"
script_layout_interface = {path = "../script_layout_interface"}
script_traits = {path = "../script_traits"}
-selectors = "0.15"
+selectors = "0.15.1"
serde = "0.8"
servo_atoms = {path = "../atoms"}
servo_config = {path = "../config", features = ["servo"] }
diff --git a/components/script/dom/beforeunloadevent.rs b/components/script/dom/beforeunloadevent.rs
index d9162002016..3787bb5b62d 100644
--- a/components/script/dom/beforeunloadevent.rs
+++ b/components/script/dom/beforeunloadevent.rs
@@ -13,7 +13,7 @@ use dom::bindings::js::Root;
use dom::bindings::reflector::reflect_dom_object;
use dom::bindings::str::DOMString;
use dom::event::{Event, EventBubbles, EventCancelable};
-use dom::globalscope::GlobalScope;
+use dom::window::Window;
use servo_atoms::Atom;
// https://html.spec.whatwg.org/multipage/#beforeunloadevent
@@ -31,17 +31,17 @@ impl BeforeUnloadEvent {
}
}
- pub fn new_uninitialized(global: &GlobalScope) -> Root<BeforeUnloadEvent> {
+ pub fn new_uninitialized(window: &Window) -> Root<BeforeUnloadEvent> {
reflect_dom_object(box BeforeUnloadEvent::new_inherited(),
- global,
+ window,
BeforeUnloadEventBinding::Wrap)
}
- pub fn new(global: &GlobalScope,
+ pub fn new(window: &Window,
type_: Atom,
bubbles: EventBubbles,
cancelable: EventCancelable) -> Root<BeforeUnloadEvent> {
- let ev = BeforeUnloadEvent::new_uninitialized(global);
+ let ev = BeforeUnloadEvent::new_uninitialized(window);
{
let event = ev.upcast::<Event>();
event.init_event(type_, bool::from(bubbles),
diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs
index 8702120c92e..6bf8c841d4d 100644
--- a/components/script/dom/document.rs
+++ b/components/script/dom/document.rs
@@ -7,6 +7,7 @@ use devtools_traits::ScriptToDevtoolsControlMsg;
use document_loader::{DocumentLoader, LoadType};
use dom::activation::{ActivationSource, synthetic_click_activation};
use dom::attr::Attr;
+use dom::beforeunloadevent::BeforeUnloadEvent;
use dom::bindings::callback::ExceptionHandling;
use dom::bindings::cell::DOMRefCell;
use dom::bindings::codegen::Bindings::DOMRectBinding::DOMRectMethods;
@@ -40,8 +41,7 @@ use dom::documenttype::DocumentType;
use dom::domimplementation::DOMImplementation;
use dom::element::{Element, ElementCreator, ElementPerformFullscreenEnter, ElementPerformFullscreenExit};
use dom::errorevent::ErrorEvent;
-use dom::event::{Event, EventBubbles, EventCancelable, EventDefault};
-use dom::eventdispatcher::EventStatus;
+use dom::event::{Event, EventBubbles, EventCancelable, EventDefault, EventStatus};
use dom::eventtarget::EventTarget;
use dom::focusevent::FocusEvent;
use dom::forcetouchevent::ForceTouchEvent;
@@ -2603,6 +2603,8 @@ impl DocumentMethods for Document {
fn CreateEvent(&self, mut interface: DOMString) -> Fallible<Root<Event>> {
interface.make_ascii_lowercase();
match &*interface {
+ "beforeunloadevent" =>
+ Ok(Root::upcast(BeforeUnloadEvent::new_uninitialized(&self.window))),
"closeevent" =>
Ok(Root::upcast(CloseEvent::new_uninitialized(self.window.upcast()))),
"customevent" =>
@@ -2612,9 +2614,9 @@ impl DocumentMethods for Document {
"events" | "event" | "htmlevents" | "svgevents" =>
Ok(Event::new_uninitialized(&self.window.upcast())),
"focusevent" =>
- Ok(Root::upcast(FocusEvent::new_uninitialized(self.window.upcast()))),
+ Ok(Root::upcast(FocusEvent::new_uninitialized(&self.window))),
"hashchangeevent" =>
- Ok(Root::upcast(HashChangeEvent::new_uninitialized(&self.window.upcast()))),
+ Ok(Root::upcast(HashChangeEvent::new_uninitialized(&self.window))),
"keyboardevent" =>
Ok(Root::upcast(KeyboardEvent::new_uninitialized(&self.window))),
"messageevent" =>
@@ -2622,9 +2624,9 @@ impl DocumentMethods for Document {
"mouseevent" | "mouseevents" =>
Ok(Root::upcast(MouseEvent::new_uninitialized(&self.window))),
"pagetransitionevent" =>
- Ok(Root::upcast(PageTransitionEvent::new_uninitialized(self.window.upcast()))),
+ Ok(Root::upcast(PageTransitionEvent::new_uninitialized(&self.window))),
"popstateevent" =>
- Ok(Root::upcast(PopStateEvent::new_uninitialized(self.window.upcast()))),
+ Ok(Root::upcast(PopStateEvent::new_uninitialized(&self.window))),
"progressevent" =>
Ok(Root::upcast(ProgressEvent::new_uninitialized(self.window.upcast()))),
"storageevent" => {
diff --git a/components/script/dom/event.rs b/components/script/dom/event.rs
index fa3b9bfae6b..2d3c2afe460 100644
--- a/components/script/dom/event.rs
+++ b/components/script/dom/event.rs
@@ -2,103 +2,29 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+use devtools_traits::{TimelineMarker, TimelineMarkerType};
+use dom::bindings::callback::ExceptionHandling;
use dom::bindings::cell::DOMRefCell;
use dom::bindings::codegen::Bindings::EventBinding;
use dom::bindings::codegen::Bindings::EventBinding::{EventConstants, EventMethods};
use dom::bindings::error::Fallible;
-use dom::bindings::js::{MutNullableJS, Root};
+use dom::bindings::inheritance::Castable;
+use dom::bindings::js::{JS, MutNullableJS, Root, RootedReference};
use dom::bindings::refcounted::Trusted;
-use dom::bindings::reflector::{Reflector, reflect_dom_object};
+use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
use dom::bindings::str::DOMString;
-use dom::eventdispatcher::EventStatus;
-use dom::eventtarget::EventTarget;
+use dom::document::Document;
+use dom::eventtarget::{CompiledEventListener, EventTarget, ListenerPhase};
use dom::globalscope::GlobalScope;
+use dom::node::Node;
+use dom::virtualmethods::vtable_for;
+use dom::window::Window;
use script_thread::Runnable;
use servo_atoms::Atom;
use std::cell::Cell;
use std::default::Default;
use time;
-#[derive(JSTraceable, Copy, Clone, Debug, PartialEq, Eq)]
-#[repr(u16)]
-#[derive(HeapSizeOf)]
-pub enum EventPhase {
- None = EventConstants::NONE,
- Capturing = EventConstants::CAPTURING_PHASE,
- AtTarget = EventConstants::AT_TARGET,
- Bubbling = EventConstants::BUBBLING_PHASE,
-}
-
-#[derive(PartialEq, HeapSizeOf, Copy, Clone)]
-pub enum EventBubbles {
- Bubbles,
- DoesNotBubble
-}
-
-impl From<EventBubbles> for bool {
- fn from(bubbles: EventBubbles) -> Self {
- match bubbles {
- EventBubbles::Bubbles => true,
- EventBubbles::DoesNotBubble => false
- }
- }
-}
-
-impl From<bool> for EventBubbles {
- fn from(boolean: bool) -> Self {
- match boolean {
- true => EventBubbles::Bubbles,
- false => EventBubbles::DoesNotBubble
- }
- }
-}
-
-#[derive(PartialEq, HeapSizeOf, Copy, Clone)]
-pub enum EventCancelable {
- Cancelable,
- NotCancelable
-}
-
-impl From<EventCancelable> for bool {
- fn from(bubbles: EventCancelable) -> Self {
- match bubbles {
- EventCancelable::Cancelable => true,
- EventCancelable::NotCancelable => false
- }
- }
-}
-
-impl From<bool> for EventCancelable {
- fn from(boolean: bool) -> Self {
- match boolean {
- true => EventCancelable::Cancelable,
- false => EventCancelable::NotCancelable
- }
- }
-}
-
-/// An enum to indicate whether the default action of an event is allowed.
-///
-/// This should've been a bool. Instead, it's an enum, because, aside from the allowed/canceled
-/// states, we also need something to stop the event from being handled again (without cancelling
-/// the event entirely). For example, an Up/Down `KeyEvent` inside a `textarea` element will
-/// trigger the cursor to go up/down if the text inside the element spans multiple lines. This enum
-/// helps us to prevent such events from being [sent to the constellation][msg] where it will be
-/// handled once again for page scrolling (which is definitely not what we'd want).
-///
-/// [msg]: https://doc.servo.org/script_traits/enum.ConstellationMsg.html#variant.KeyEvent
-///
-#[derive(JSTraceable, HeapSizeOf, Copy, Clone, PartialEq)]
-pub enum EventDefault {
- /// The default action of the event is allowed (constructor's default)
- Allowed,
- /// The default action has been prevented by calling `PreventDefault`
- Prevented,
- /// The event has been handled somewhere in the DOM, and it should be prevented from being
- /// re-handled elsewhere. This doesn't affect the judgement of `DefaultPrevented`
- Handled,
-}
-
#[dom_struct]
pub struct Event {
reflector_: Reflector,
@@ -176,46 +102,74 @@ impl Event {
self.cancelable.set(cancelable);
}
- pub fn status(&self) -> EventStatus {
- match self.DefaultPrevented() {
- true => EventStatus::Canceled,
- false => EventStatus::NotCanceled
- }
- }
+ // https://dom.spec.whatwg.org/#concept-event-dispatch
+ pub fn dispatch(&self,
+ target: &EventTarget,
+ target_override: Option<&EventTarget>)
+ -> EventStatus {
+ assert!(!self.dispatching());
+ assert!(self.initialized());
+ assert_eq!(self.phase.get(), EventPhase::None);
+ assert!(self.GetCurrentTarget().is_none());
- #[inline]
- pub fn set_current_target(&self, val: &EventTarget) {
- self.current_target.set(Some(val));
- }
+ // Step 1.
+ self.dispatching.set(true);
- #[inline]
- pub fn set_target(&self, val: &EventTarget) {
- self.target.set(Some(val));
- }
+ // Step 2.
+ self.target.set(Some(target_override.unwrap_or(target)));
- #[inline]
- pub fn phase(&self) -> EventPhase {
- self.phase.get()
- }
+ if self.stop_propagation.get() {
+ // If the event's stop propagation flag is set, we can skip everything because
+ // it prevents the calls of the invoke algorithm in the spec.
- #[inline]
- pub fn set_phase(&self, val: EventPhase) {
- self.phase.set(val)
- }
+ // Step 10-12.
+ self.clear_dispatching_flags();
- #[inline]
- pub fn stop_propagation(&self) -> bool {
- self.stop_propagation.get()
- }
+ // Step 14.
+ return self.status();
+ }
- #[inline]
- pub fn stop_immediate(&self) -> bool {
- self.stop_immediate.get()
+ // Step 3. The "invoke" algorithm is only used on `target` separately,
+ // so we don't put it in the path.
+ rooted_vec!(let mut event_path);
+
+ // Step 4.
+ if let Some(target_node) = target.downcast::<Node>() {
+ for ancestor in target_node.ancestors() {
+ event_path.push(JS::from_ref(ancestor.upcast::<EventTarget>()));
+ }
+ let top_most_ancestor_or_target =
+ Root::from_ref(event_path.r().last().cloned().unwrap_or(target));
+ if let Some(document) = Root::downcast::<Document>(top_most_ancestor_or_target) {
+ if self.type_() != atom!("load") && document.browsing_context().is_some() {
+ event_path.push(JS::from_ref(document.window().upcast()));
+ }
+ }
+ }
+
+ // Steps 5-9. In a separate function to short-circuit various things easily.
+ dispatch_to_listeners(self, target, event_path.r());
+
+ // Default action.
+ if let Some(target) = self.GetTarget() {
+ if let Some(node) = target.downcast::<Node>() {
+ let vtable = vtable_for(&node);
+ vtable.handle_event(self);
+ }
+ }
+
+ // Step 10-12.
+ self.clear_dispatching_flags();
+
+ // Step 14.
+ self.status()
}
- #[inline]
- pub fn bubbles(&self) -> bool {
- self.bubbles.get()
+ pub fn status(&self) -> EventStatus {
+ match self.DefaultPrevented() {
+ true => EventStatus::Canceled,
+ false => EventStatus::NotCanceled
+ }
}
#[inline]
@@ -224,21 +178,14 @@ impl Event {
}
#[inline]
- // https://dom.spec.whatwg.org/#concept-event-dispatch Step 1.
- pub fn mark_as_dispatching(&self) {
- assert!(!self.dispatching.get());
- self.dispatching.set(true);
- }
-
- #[inline]
// https://dom.spec.whatwg.org/#concept-event-dispatch Steps 10-12.
- pub fn clear_dispatching_flags(&self) {
+ fn clear_dispatching_flags(&self) {
assert!(self.dispatching.get());
self.dispatching.set(false);
self.stop_propagation.set(false);
self.stop_immediate.set(false);
- self.set_phase(EventPhase::None);
+ self.phase.set(EventPhase::None);
self.current_target.set(None);
}
@@ -261,6 +208,16 @@ impl Event {
pub fn get_cancel_state(&self) -> EventDefault {
self.canceled.get()
}
+
+ pub fn set_trusted(&self, trusted: bool) {
+ self.trusted.set(trusted);
+ }
+
+ // https://html.spec.whatwg.org/multipage/#fire-a-simple-event
+ pub fn fire(&self, target: &EventTarget) -> EventStatus {
+ self.set_trusted(true);
+ target.dispatch_event(self)
+ }
}
impl EventMethods for Event {
@@ -336,19 +293,92 @@ impl EventMethods for Event {
}
}
+#[derive(PartialEq, HeapSizeOf, Copy, Clone)]
+pub enum EventBubbles {
+ Bubbles,
+ DoesNotBubble
+}
-impl Event {
- pub fn set_trusted(&self, trusted: bool) {
- self.trusted.set(trusted);
+impl From<bool> for EventBubbles {
+ fn from(boolean: bool) -> Self {
+ match boolean {
+ true => EventBubbles::Bubbles,
+ false => EventBubbles::DoesNotBubble
+ }
}
+}
- // https://html.spec.whatwg.org/multipage/#fire-a-simple-event
- pub fn fire(&self, target: &EventTarget) -> EventStatus {
- self.set_trusted(true);
- target.dispatch_event(self)
+impl From<EventBubbles> for bool {
+ fn from(bubbles: EventBubbles) -> Self {
+ match bubbles {
+ EventBubbles::Bubbles => true,
+ EventBubbles::DoesNotBubble => false
+ }
}
}
+#[derive(PartialEq, HeapSizeOf, Copy, Clone)]
+pub enum EventCancelable {
+ Cancelable,
+ NotCancelable
+}
+
+impl From<bool> for EventCancelable {
+ fn from(boolean: bool) -> Self {
+ match boolean {
+ true => EventCancelable::Cancelable,
+ false => EventCancelable::NotCancelable
+ }
+ }
+}
+
+impl From<EventCancelable> for bool {
+ fn from(bubbles: EventCancelable) -> Self {
+ match bubbles {
+ EventCancelable::Cancelable => true,
+ EventCancelable::NotCancelable => false
+ }
+ }
+}
+
+#[derive(JSTraceable, Copy, Clone, Debug, PartialEq, Eq)]
+#[repr(u16)]
+#[derive(HeapSizeOf)]
+pub enum EventPhase {
+ None = EventConstants::NONE,
+ Capturing = EventConstants::CAPTURING_PHASE,
+ AtTarget = EventConstants::AT_TARGET,
+ Bubbling = EventConstants::BUBBLING_PHASE,
+}
+
+/// An enum to indicate whether the default action of an event is allowed.
+///
+/// This should've been a bool. Instead, it's an enum, because, aside from the allowed/canceled
+/// states, we also need something to stop the event from being handled again (without cancelling
+/// the event entirely). For example, an Up/Down `KeyEvent` inside a `textarea` element will
+/// trigger the cursor to go up/down if the text inside the element spans multiple lines. This enum
+/// helps us to prevent such events from being [sent to the constellation][msg] where it will be
+/// handled once again for page scrolling (which is definitely not what we'd want).
+///
+/// [msg]: https://doc.servo.org/script_traits/enum.ConstellationMsg.html#variant.KeyEvent
+///
+#[derive(JSTraceable, HeapSizeOf, Copy, Clone, PartialEq)]
+pub enum EventDefault {
+ /// The default action of the event is allowed (constructor's default)
+ Allowed,
+ /// The default action has been prevented by calling `PreventDefault`
+ Prevented,
+ /// The event has been handled somewhere in the DOM, and it should be prevented from being
+ /// re-handled elsewhere. This doesn't affect the judgement of `DefaultPrevented`
+ Handled,
+}
+
+#[derive(PartialEq)]
+pub enum EventStatus {
+ Canceled,
+ NotCanceled
+}
+
// https://dom.spec.whatwg.org/#concept-event-fire
pub struct EventRunnable {
pub target: Trusted<EventTarget>,
@@ -382,3 +412,116 @@ impl Runnable for SimpleEventRunnable {
target.fire_event(self.name);
}
}
+
+// See dispatch_event.
+// https://dom.spec.whatwg.org/#concept-event-dispatch
+fn dispatch_to_listeners(event: &Event, target: &EventTarget, event_path: &[&EventTarget]) {
+ assert!(!event.stop_propagation.get());
+ assert!(!event.stop_immediate.get());
+
+ let window = match Root::downcast::<Window>(target.global()) {
+ Some(window) => {
+ if window.need_emit_timeline_marker(TimelineMarkerType::DOMEvent) {
+ Some(window)
+ } else {
+ None
+ }
+ },
+ _ => None,
+ };
+
+ // Step 5.
+ event.phase.set(EventPhase::Capturing);
+
+ // Step 6.
+ for object in event_path.iter().rev() {
+ invoke(window.r(), object, event, Some(ListenerPhase::Capturing));
+ if event.stop_propagation.get() {
+ return;
+ }
+ }
+ assert!(!event.stop_propagation.get());
+ assert!(!event.stop_immediate.get());
+
+ // Step 7.
+ event.phase.set(EventPhase::AtTarget);
+
+ // Step 8.
+ invoke(window.r(), target, event, None);
+ if event.stop_propagation.get() {
+ return;
+ }
+ assert!(!event.stop_propagation.get());
+ assert!(!event.stop_immediate.get());
+
+ if !event.bubbles.get() {
+ return;
+ }
+
+ // Step 9.1.
+ event.phase.set(EventPhase::Bubbling);
+
+ // Step 9.2.
+ for object in event_path {
+ invoke(window.r(), object, event, Some(ListenerPhase::Bubbling));
+ if event.stop_propagation.get() {
+ return;
+ }
+ }
+}
+
+// https://dom.spec.whatwg.org/#concept-event-listener-invoke
+fn invoke(window: Option<&Window>,
+ object: &EventTarget,
+ event: &Event,
+ specific_listener_phase: Option<ListenerPhase>) {
+ // Step 1.
+ assert!(!event.stop_propagation.get());
+
+ // Steps 2-3.
+ let listeners = object.get_listeners_for(&event.type_(), specific_listener_phase);
+
+ // Step 4.
+ event.current_target.set(Some(object));
+
+ // Step 5.
+ inner_invoke(window, object, event, &listeners);
+
+ // TODO: step 6.
+}
+
+// https://dom.spec.whatwg.org/#concept-event-listener-inner-invoke
+fn inner_invoke(window: Option<&Window>,
+ object: &EventTarget,
+ event: &Event,
+ listeners: &[CompiledEventListener])
+ -> bool {
+ // Step 1.
+ let mut found = false;
+
+ // Step 2.
+ for listener in listeners {
+ // Steps 2.1 and 2.3-2.4 are not done because `listeners` contain only the
+ // relevant ones for this invoke call during the dispatch algorithm.
+
+ // Step 2.2.
+ found = true;
+
+ // TODO: step 2.5.
+
+ // Step 2.6.
+ let marker = TimelineMarker::start("DOMEvent".to_owned());
+ listener.call_or_handle_event(object, event, ExceptionHandling::Report);
+ if let Some(window) = window {
+ window.emit_timeline_marker(marker.end());
+ }
+ if event.stop_immediate.get() {
+ return found;
+ }
+
+ // TODO: step 2.7.
+ }
+
+ // Step 3.
+ found
+}
diff --git a/components/script/dom/eventdispatcher.rs b/components/script/dom/eventdispatcher.rs
deleted file mode 100644
index bdec56532dc..00000000000
--- a/components/script/dom/eventdispatcher.rs
+++ /dev/null
@@ -1,223 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-use devtools_traits::{StartedTimelineMarker, TimelineMarker, TimelineMarkerType};
-use dom::bindings::callback::ExceptionHandling::Report;
-use dom::bindings::codegen::Bindings::EventBinding::EventMethods;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::js::{JS, Root, RootedReference};
-use dom::bindings::reflector::DomObject;
-use dom::document::Document;
-use dom::event::{Event, EventPhase};
-use dom::eventtarget::{CompiledEventListener, EventTarget, ListenerPhase};
-use dom::node::Node;
-use dom::virtualmethods::vtable_for;
-use dom::window::Window;
-
-struct AutoDOMEventMarker {
- window: Root<Window>,
- marker: Option<StartedTimelineMarker>,
-}
-
-impl AutoDOMEventMarker {
- fn new(window: &Window) -> AutoDOMEventMarker {
- AutoDOMEventMarker {
- window: Root::from_ref(window),
- marker: Some(TimelineMarker::start("DOMEvent".to_owned())),
- }
- }
-}
-
-impl Drop for AutoDOMEventMarker {
- fn drop(&mut self) {
- self.window.emit_timeline_marker(self.marker.take().unwrap().end());
- }
-}
-
-fn handle_event(window: Option<&Window>, listener: &CompiledEventListener,
- current_target: &EventTarget, event: &Event) {
- let _marker;
- if let Some(window) = window {
- _marker = AutoDOMEventMarker::new(window);
- }
-
- listener.call_or_handle_event(current_target, event, Report);
-}
-
-// See dispatch_event.
-// https://dom.spec.whatwg.org/#concept-event-dispatch
-fn dispatch_to_listeners(event: &Event, target: &EventTarget, event_path: &[&EventTarget]) {
- assert!(!event.stop_propagation());
- assert!(!event.stop_immediate());
-
- let window = match Root::downcast::<Window>(target.global()) {
- Some(window) => {
- if window.need_emit_timeline_marker(TimelineMarkerType::DOMEvent) {
- Some(window)
- } else {
- None
- }
- },
- _ => None,
- };
-
- // Step 5.
- event.set_phase(EventPhase::Capturing);
-
- // Step 6.
- for object in event_path.iter().rev() {
- invoke(window.r(), object, event, Some(ListenerPhase::Capturing));
- if event.stop_propagation() {
- return;
- }
- }
- assert!(!event.stop_propagation());
- assert!(!event.stop_immediate());
-
- // Step 7.
- event.set_phase(EventPhase::AtTarget);
-
- // Step 8.
- invoke(window.r(), target, event, None);
- if event.stop_propagation() {
- return;
- }
- assert!(!event.stop_propagation());
- assert!(!event.stop_immediate());
-
- if !event.bubbles() {
- return;
- }
-
- // Step 9.1.
- event.set_phase(EventPhase::Bubbling);
-
- // Step 9.2.
- for object in event_path {
- invoke(window.r(), object, event, Some(ListenerPhase::Bubbling));
- if event.stop_propagation() {
- return;
- }
- }
-}
-
-#[derive(PartialEq)]
-pub enum EventStatus {
- Canceled,
- NotCanceled
-}
-
-// https://dom.spec.whatwg.org/#concept-event-dispatch
-pub fn dispatch_event(target: &EventTarget,
- target_override: Option<&EventTarget>,
- event: &Event) -> EventStatus {
- assert!(!event.dispatching());
- assert!(event.initialized());
- assert_eq!(event.phase(), EventPhase::None);
- assert!(event.GetCurrentTarget().is_none());
-
- // Step 1.
- event.mark_as_dispatching();
-
- // Step 2.
- event.set_target(target_override.unwrap_or(target));
-
- if event.stop_propagation() {
- // If the event's stop propagation flag is set, we can skip everything because
- // it prevents the calls of the invoke algorithm in the spec.
-
- // Step 10-12.
- event.clear_dispatching_flags();
-
- // Step 14.
- return event.status();
- }
-
- // Step 3. The "invoke" algorithm is only used on `target` separately,
- // so we don't put it in the path.
- rooted_vec!(let mut event_path);
-
- // Step 4.
- if let Some(target_node) = target.downcast::<Node>() {
- for ancestor in target_node.ancestors() {
- event_path.push(JS::from_ref(ancestor.upcast::<EventTarget>()));
- }
- let top_most_ancestor_or_target =
- Root::from_ref(event_path.r().last().cloned().unwrap_or(target));
- if let Some(document) = Root::downcast::<Document>(top_most_ancestor_or_target) {
- if event.type_() != atom!("load") && document.browsing_context().is_some() {
- event_path.push(JS::from_ref(document.window().upcast()));
- }
- }
- }
-
- // Steps 5-9. In a separate function to short-circuit various things easily.
- dispatch_to_listeners(event, target, event_path.r());
-
- // Default action.
- if let Some(target) = event.GetTarget() {
- if let Some(node) = target.downcast::<Node>() {
- let vtable = vtable_for(&node);
- vtable.handle_event(event);
- }
- }
-
- // Step 10-12.
- event.clear_dispatching_flags();
-
- // Step 14.
- event.status()
-}
-
-// https://dom.spec.whatwg.org/#concept-event-listener-invoke
-fn invoke(window: Option<&Window>,
- object: &EventTarget,
- event: &Event,
- specific_listener_phase: Option<ListenerPhase>) {
- // Step 1.
- assert!(!event.stop_propagation());
-
- // Steps 2-3.
- let listeners = object.get_listeners_for(&event.type_(), specific_listener_phase);
-
- // Step 4.
- event.set_current_target(object);
-
- // Step 5.
- inner_invoke(window, object, event, &listeners);
-
- // TODO: step 6.
-}
-
-// https://dom.spec.whatwg.org/#concept-event-listener-inner-invoke
-fn inner_invoke(window: Option<&Window>,
- object: &EventTarget,
- event: &Event,
- listeners: &[CompiledEventListener])
- -> bool {
- // Step 1.
- let mut found = false;
-
- // Step 2.
- for listener in listeners {
- // Steps 2.1 and 2.3-2.4 are not done because `listeners` contain only the
- // relevant ones for this invoke call during the dispatch algorithm.
-
- // Step 2.2.
- found = true;
-
- // TODO: step 2.5.
-
- // Step 2.6.
- handle_event(window, listener, object, event);
- if event.stop_immediate() {
- return found;
- }
-
- // TODO: step 2.7.
- }
-
- // Step 3.
- found
-}
diff --git a/components/script/dom/eventtarget.rs b/components/script/dom/eventtarget.rs
index 1023b97600f..15790d7ce53 100644
--- a/components/script/dom/eventtarget.rs
+++ b/components/script/dom/eventtarget.rs
@@ -22,8 +22,7 @@ use dom::bindings::reflector::{DomObject, Reflector};
use dom::bindings::str::DOMString;
use dom::element::Element;
use dom::errorevent::ErrorEvent;
-use dom::event::{Event, EventBubbles, EventCancelable};
-use dom::eventdispatcher::{EventStatus, dispatch_event};
+use dom::event::{Event, EventBubbles, EventCancelable, EventStatus};
use dom::node::document_from_node;
use dom::virtualmethods::VirtualMethods;
use dom::window::Window;
@@ -300,11 +299,11 @@ impl EventTarget {
pub fn dispatch_event_with_target(&self,
target: &EventTarget,
event: &Event) -> EventStatus {
- dispatch_event(self, Some(target), event)
+ event.dispatch(self, Some(target))
}
pub fn dispatch_event(&self, event: &Event) -> EventStatus {
- dispatch_event(self, None, event)
+ event.dispatch(self, None)
}
/// https://html.spec.whatwg.org/multipage/#event-handler-attributes:event-handlers-11
diff --git a/components/script/dom/focusevent.rs b/components/script/dom/focusevent.rs
index c7e48531479..6ffed30e857 100644
--- a/components/script/dom/focusevent.rs
+++ b/components/script/dom/focusevent.rs
@@ -12,7 +12,6 @@ use dom::bindings::reflector::reflect_dom_object;
use dom::bindings::str::DOMString;
use dom::event::{EventBubbles, EventCancelable};
use dom::eventtarget::EventTarget;
-use dom::globalscope::GlobalScope;
use dom::uievent::UIEvent;
use dom::window::Window;
use std::default::Default;
@@ -31,9 +30,9 @@ impl FocusEvent {
}
}
- pub fn new_uninitialized(global: &GlobalScope) -> Root<FocusEvent> {
+ pub fn new_uninitialized(window: &Window) -> Root<FocusEvent> {
reflect_dom_object(box FocusEvent::new_inherited(),
- global,
+ window,
FocusEventBinding::Wrap)
}
@@ -44,7 +43,7 @@ impl FocusEvent {
view: Option<&Window>,
detail: i32,
related_target: Option<&EventTarget>) -> Root<FocusEvent> {
- let ev = FocusEvent::new_uninitialized(window.upcast());
+ let ev = FocusEvent::new_uninitialized(window);
ev.upcast::<UIEvent>().InitUIEvent(type_,
bool::from(can_bubble),
bool::from(cancelable),
diff --git a/components/script/dom/globalscope.rs b/components/script/dom/globalscope.rs
index 7a9e5074266..f513d4285ad 100644
--- a/components/script/dom/globalscope.rs
+++ b/components/script/dom/globalscope.rs
@@ -15,8 +15,7 @@ use dom::bindings::str::DOMString;
use dom::crypto::Crypto;
use dom::dedicatedworkerglobalscope::DedicatedWorkerGlobalScope;
use dom::errorevent::ErrorEvent;
-use dom::event::{Event, EventBubbles, EventCancelable};
-use dom::eventdispatcher::EventStatus;
+use dom::event::{Event, EventBubbles, EventCancelable, EventStatus};
use dom::eventtarget::EventTarget;
use dom::window::Window;
use dom::workerglobalscope::WorkerGlobalScope;
diff --git a/components/script/dom/hashchangeevent.rs b/components/script/dom/hashchangeevent.rs
index b93b7a93631..cd4b2b0a71f 100644
--- a/components/script/dom/hashchangeevent.rs
+++ b/components/script/dom/hashchangeevent.rs
@@ -11,7 +11,7 @@ use dom::bindings::js::Root;
use dom::bindings::reflector::reflect_dom_object;
use dom::bindings::str::{DOMString, USVString};
use dom::event::Event;
-use dom::globalscope::GlobalScope;
+use dom::window::Window;
use servo_atoms::Atom;
// https://html.spec.whatwg.org/multipage/#hashchangeevent
@@ -31,13 +31,13 @@ impl HashChangeEvent {
}
}
- pub fn new_uninitialized(global: &GlobalScope) -> Root<HashChangeEvent> {
+ pub fn new_uninitialized(window: &Window) -> Root<HashChangeEvent> {
reflect_dom_object(box HashChangeEvent::new_inherited(String::new(), String::new()),
- global,
+ window,
HashChangeEventBinding::Wrap)
}
- pub fn new(global: &GlobalScope,
+ pub fn new(window: &Window,
type_: Atom,
bubbles: bool,
cancelable: bool,
@@ -45,7 +45,7 @@ impl HashChangeEvent {
new_url: String)
-> Root<HashChangeEvent> {
let ev = reflect_dom_object(box HashChangeEvent::new_inherited(old_url, new_url),
- global,
+ window,
HashChangeEventBinding::Wrap);
{
let event = ev.upcast::<Event>();
@@ -54,11 +54,11 @@ impl HashChangeEvent {
ev
}
- pub fn Constructor(global: &GlobalScope,
+ pub fn Constructor(window: &Window,
type_: DOMString,
init: &HashChangeEventBinding::HashChangeEventInit)
-> Fallible<Root<HashChangeEvent>> {
- Ok(HashChangeEvent::new(global,
+ Ok(HashChangeEvent::new(window,
Atom::from(type_),
init.parent.bubbles,
init.parent.cancelable,
diff --git a/components/script/dom/htmlscriptelement.rs b/components/script/dom/htmlscriptelement.rs
index 42b4a4d149a..e1e8dabac7b 100644
--- a/components/script/dom/htmlscriptelement.rs
+++ b/components/script/dom/htmlscriptelement.rs
@@ -17,8 +17,7 @@ use dom::bindings::str::DOMString;
use dom::document::Document;
use dom::element::{AttributeMutation, Element, ElementCreator};
use dom::element::{cors_setting_for_element, reflect_cross_origin_attribute, set_cross_origin_attribute};
-use dom::event::{Event, EventBubbles, EventCancelable};
-use dom::eventdispatcher::EventStatus;
+use dom::event::{Event, EventBubbles, EventCancelable, EventStatus};
use dom::globalscope::GlobalScope;
use dom::htmlelement::HTMLElement;
use dom::node::{ChildrenMutation, CloneChildrenFlag, Node};
diff --git a/components/script/dom/mod.rs b/components/script/dom/mod.rs
index 0fd610ed46b..5de594a5195 100644
--- a/components/script/dom/mod.rs
+++ b/components/script/dom/mod.rs
@@ -276,7 +276,6 @@ pub mod domtokenlist;
pub mod element;
pub mod errorevent;
pub mod event;
-pub mod eventdispatcher;
pub mod eventsource;
pub mod eventtarget;
pub mod extendableevent;
diff --git a/components/script/dom/pagetransitionevent.rs b/components/script/dom/pagetransitionevent.rs
index b40f6c1ab39..e76a6444d4c 100644
--- a/components/script/dom/pagetransitionevent.rs
+++ b/components/script/dom/pagetransitionevent.rs
@@ -11,7 +11,7 @@ use dom::bindings::js::Root;
use dom::bindings::reflector::reflect_dom_object;
use dom::bindings::str::DOMString;
use dom::event::Event;
-use dom::globalscope::GlobalScope;
+use dom::window::Window;
use servo_atoms::Atom;
use std::cell::Cell;
@@ -30,19 +30,19 @@ impl PageTransitionEvent {
}
}
- pub fn new_uninitialized(global: &GlobalScope) -> Root<PageTransitionEvent> {
+ pub fn new_uninitialized(window: &Window) -> Root<PageTransitionEvent> {
reflect_dom_object(box PageTransitionEvent::new_inherited(),
- global,
+ window,
PageTransitionEventBinding::Wrap)
}
- pub fn new(global: &GlobalScope,
+ pub fn new(window: &Window,
type_: Atom,
bubbles: bool,
cancelable: bool,
persisted: bool)
-> Root<PageTransitionEvent> {
- let ev = PageTransitionEvent::new_uninitialized(global);
+ let ev = PageTransitionEvent::new_uninitialized(window);
ev.persisted.set(persisted);
{
let event = ev.upcast::<Event>();
@@ -51,11 +51,11 @@ impl PageTransitionEvent {
ev
}
- pub fn Constructor(global: &GlobalScope,
+ pub fn Constructor(window: &Window,
type_: DOMString,
init: &PageTransitionEventBinding::PageTransitionEventInit)
-> Fallible<Root<PageTransitionEvent>> {
- Ok(PageTransitionEvent::new(global,
+ Ok(PageTransitionEvent::new(window,
Atom::from(type_),
init.parent.bubbles,
init.parent.cancelable,
diff --git a/components/script/dom/popstateevent.rs b/components/script/dom/popstateevent.rs
index 44183f7483f..fde05e30394 100644
--- a/components/script/dom/popstateevent.rs
+++ b/components/script/dom/popstateevent.rs
@@ -11,7 +11,7 @@ use dom::bindings::js::{MutHeapJSVal, Root};
use dom::bindings::reflector::reflect_dom_object;
use dom::bindings::str::DOMString;
use dom::event::Event;
-use dom::globalscope::GlobalScope;
+use dom::window::Window;
use js::jsapi::{HandleValue, JSContext};
use js::jsval::JSVal;
use servo_atoms::Atom;
@@ -32,19 +32,19 @@ impl PopStateEvent {
}
}
- pub fn new_uninitialized(global: &GlobalScope) -> Root<PopStateEvent> {
+ pub fn new_uninitialized(window: &Window) -> Root<PopStateEvent> {
reflect_dom_object(box PopStateEvent::new_inherited(),
- global,
+ window,
PopStateEventBinding::Wrap)
}
- pub fn new(global: &GlobalScope,
+ pub fn new(window: &Window,
type_: Atom,
bubbles: bool,
cancelable: bool,
state: HandleValue)
-> Root<PopStateEvent> {
- let ev = PopStateEvent::new_uninitialized(global);
+ let ev = PopStateEvent::new_uninitialized(window);
ev.state.set(state.get());
{
let event = ev.upcast::<Event>();
@@ -54,11 +54,11 @@ impl PopStateEvent {
}
#[allow(unsafe_code)]
- pub fn Constructor(global: &GlobalScope,
+ pub fn Constructor(window: &Window,
type_: DOMString,
init: &PopStateEventBinding::PopStateEventInit)
-> Fallible<Root<PopStateEvent>> {
- Ok(PopStateEvent::new(global,
+ Ok(PopStateEvent::new(window,
Atom::from(type_),
init.parent.bubbles,
init.parent.cancelable,
diff --git a/components/script/dom/transitionevent.rs b/components/script/dom/transitionevent.rs
index cc17e77eae1..4630ec70bc0 100644
--- a/components/script/dom/transitionevent.rs
+++ b/components/script/dom/transitionevent.rs
@@ -12,7 +12,6 @@ use dom::bindings::num::Finite;
use dom::bindings::reflector::reflect_dom_object;
use dom::bindings::str::DOMString;
use dom::event::Event;
-use dom::globalscope::GlobalScope;
use dom::window::Window;
use servo_atoms::Atom;
@@ -25,7 +24,7 @@ pub struct TransitionEvent {
}
impl TransitionEvent {
- pub fn new_inherited(init: &TransitionEventInit) -> TransitionEvent {
+ fn new_inherited(init: &TransitionEventInit) -> TransitionEvent {
TransitionEvent {
event: Event::new_inherited(),
property_name: Atom::from(init.propertyName.clone()),
@@ -34,11 +33,11 @@ impl TransitionEvent {
}
}
- pub fn new(global: &GlobalScope,
+ pub fn new(window: &Window,
type_: Atom,
init: &TransitionEventInit) -> Root<TransitionEvent> {
let ev = reflect_dom_object(box TransitionEvent::new_inherited(init),
- global,
+ window,
TransitionEventBinding::Wrap);
{
let event = ev.upcast::<Event>();
@@ -50,8 +49,7 @@ impl TransitionEvent {
pub fn Constructor(window: &Window,
type_: DOMString,
init: &TransitionEventInit) -> Fallible<Root<TransitionEvent>> {
- let global = window.upcast::<GlobalScope>();
- Ok(TransitionEvent::new(global, Atom::from(type_), init))
+ Ok(TransitionEvent::new(window, Atom::from(type_), init))
}
}
diff --git a/components/script/dom/webidls/BeforeUnloadEvent.webidl b/components/script/dom/webidls/BeforeUnloadEvent.webidl
index 74b0cd8e62c..71fe9396d48 100644
--- a/components/script/dom/webidls/BeforeUnloadEvent.webidl
+++ b/components/script/dom/webidls/BeforeUnloadEvent.webidl
@@ -6,7 +6,7 @@
* https://html.spec.whatwg.org/multipage/#beforeunloadevent
*/
-[Exposed=(Window,Worker)]
+[Exposed=Window]
interface BeforeUnloadEvent : Event {
attribute DOMString returnValue;
};
diff --git a/components/script/dom/webidls/FocusEvent.webidl b/components/script/dom/webidls/FocusEvent.webidl
index 42e560b72b4..14ec3ae67e9 100644
--- a/components/script/dom/webidls/FocusEvent.webidl
+++ b/components/script/dom/webidls/FocusEvent.webidl
@@ -3,7 +3,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://w3c.github.io/uievents/#interface-FocusEvent
-[Constructor(DOMString typeArg, optional FocusEventInit focusEventInitDict)]
+[Constructor(DOMString typeArg, optional FocusEventInit focusEventInitDict),
+ Exposed=Window]
interface FocusEvent : UIEvent {
readonly attribute EventTarget? relatedTarget;
};
diff --git a/components/script/dom/webidls/HashChangeEvent.webidl b/components/script/dom/webidls/HashChangeEvent.webidl
index d34400c7ccc..3d81e8ad383 100644
--- a/components/script/dom/webidls/HashChangeEvent.webidl
+++ b/components/script/dom/webidls/HashChangeEvent.webidl
@@ -3,7 +3,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#hashchangeevent
-[Constructor(DOMString type, optional HashChangeEventInit eventInitDict), Exposed=(Window,Worker)]
+[Constructor(DOMString type, optional HashChangeEventInit eventInitDict),
+ Exposed=Window]
interface HashChangeEvent : Event {
readonly attribute USVString oldURL;
readonly attribute USVString newURL;
diff --git a/components/script/dom/webidls/Location.webidl b/components/script/dom/webidls/Location.webidl
index 431ab87d5e5..d611a20b883 100644
--- a/components/script/dom/webidls/Location.webidl
+++ b/components/script/dom/webidls/Location.webidl
@@ -3,7 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#location
-[Exposed=(Window,Worker), Unforgeable] interface Location {
+[Exposed=Window, Unforgeable] interface Location {
/*stringifier*/ attribute USVString href;
readonly attribute USVString origin;
attribute USVString protocol;
diff --git a/components/script/dom/webidls/MouseEvent.webidl b/components/script/dom/webidls/MouseEvent.webidl
index c95739429a8..e9f7a31db48 100644
--- a/components/script/dom/webidls/MouseEvent.webidl
+++ b/components/script/dom/webidls/MouseEvent.webidl
@@ -3,7 +3,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://w3c.github.io/uievents/#interface-mouseevent
-[Constructor(DOMString typeArg, optional MouseEventInit mouseEventInitDict)]
+[Constructor(DOMString typeArg, optional MouseEventInit mouseEventInitDict),
+ Exposed=Window]
interface MouseEvent : UIEvent {
readonly attribute long screenX;
readonly attribute long screenY;
diff --git a/components/script/dom/webidls/PageTransitionEvent.webidl b/components/script/dom/webidls/PageTransitionEvent.webidl
index 3f3ed0b797a..a23f3099bad 100644
--- a/components/script/dom/webidls/PageTransitionEvent.webidl
+++ b/components/script/dom/webidls/PageTransitionEvent.webidl
@@ -3,7 +3,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#the-pagetransitionevent-interface
-[Constructor(DOMString type, optional PageTransitionEventInit eventInitDict), Exposed=(Window,Worker)]
+[Constructor(DOMString type, optional PageTransitionEventInit eventInitDict),
+ Exposed=Window]
interface PageTransitionEvent : Event {
readonly attribute boolean persisted;
};
diff --git a/components/script/dom/webidls/PopStateEvent.webidl b/components/script/dom/webidls/PopStateEvent.webidl
index f5052df597f..4508cac6288 100644
--- a/components/script/dom/webidls/PopStateEvent.webidl
+++ b/components/script/dom/webidls/PopStateEvent.webidl
@@ -3,7 +3,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://html.spec.whatwg.org/multipage/#the-popstateevent-interface
-[Constructor(DOMString type, optional PopStateEventInit eventInitDict), Exposed=(Window,Worker)]
+[Constructor(DOMString type, optional PopStateEventInit eventInitDict),
+ Exposed=Window]
interface PopStateEvent : Event {
readonly attribute any state;
};
diff --git a/components/script/dom/worker.rs b/components/script/dom/worker.rs
index 2d6581b9e43..18b3a441d68 100644
--- a/components/script/dom/worker.rs
+++ b/components/script/dom/worker.rs
@@ -17,8 +17,7 @@ use dom::bindings::str::DOMString;
use dom::bindings::structuredclone::StructuredCloneData;
use dom::dedicatedworkerglobalscope::DedicatedWorkerGlobalScope;
use dom::errorevent::ErrorEvent;
-use dom::event::{Event, EventBubbles, EventCancelable};
-use dom::eventdispatcher::EventStatus;
+use dom::event::{Event, EventBubbles, EventCancelable, EventStatus};
use dom::eventtarget::EventTarget;
use dom::globalscope::GlobalScope;
use dom::messageevent::MessageEvent;
diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs
index 8923ce7254d..db9a53816a2 100644
--- a/components/script/script_thread.rs
+++ b/components/script/script_thread.rs
@@ -1620,7 +1620,7 @@ impl ScriptThread {
// FIXME: Handle pseudo-elements properly
pseudoElement: DOMString::new()
};
- let transition_event = TransitionEvent::new(window.upcast(),
+ let transition_event = TransitionEvent::new(&window,
atom!("transitionend"),
&init);
transition_event.upcast::<Event>().fire(node.upcast());
diff --git a/components/script/test.rs b/components/script/test.rs
index 83523c47817..9aeff2a22a5 100644
--- a/components/script/test.rs
+++ b/components/script/test.rs
@@ -9,6 +9,7 @@ pub use dom::headers::normalize_value;
pub use dom::bindings::cell::DOMRefCell;
pub use dom::bindings::js::JS;
pub use dom::node::Node;
+pub use dom::bindings::refcounted::TrustedPromise;
pub mod area {
pub use dom::htmlareaelement::{Area, Shape};
diff --git a/components/script_layout_interface/Cargo.toml b/components/script_layout_interface/Cargo.toml
index f6cf201d1e7..bea25e9da96 100644
--- a/components/script_layout_interface/Cargo.toml
+++ b/components/script_layout_interface/Cargo.toml
@@ -29,7 +29,7 @@ plugins = {path = "../plugins"}
profile_traits = {path = "../profile_traits"}
range = {path = "../range"}
script_traits = {path = "../script_traits"}
-selectors = "0.15"
+selectors = "0.15.1"
servo_atoms = {path = "../atoms"}
servo_url = {path = "../url"}
style = {path = "../style"}
diff --git a/components/style/Cargo.toml b/components/style/Cargo.toml
index b6bce7e6e3c..ca3d1881c87 100644
--- a/components/style/Cargo.toml
+++ b/components/style/Cargo.toml
@@ -46,7 +46,7 @@ phf = "0.7.20"
quickersort = "2.0.0"
rayon = "0.6"
rustc-serialize = "0.3"
-selectors = "0.15"
+selectors = "0.15.1"
serde = {version = "0.8", optional = true}
serde_derive = {version = "0.8", optional = true}
servo_atoms = {path = "../atoms", optional = true}
diff --git a/components/style/build_gecko.rs b/components/style/build_gecko.rs
index 65c892f92ee..ee986f3ab9d 100644
--- a/components/style/build_gecko.rs
+++ b/components/style/build_gecko.rs
@@ -388,10 +388,15 @@ mod bindings {
"StyleTransition",
"mozilla::UniquePtr",
"mozilla::DefaultDelete",
+
+ // bindgen can't find these
+ "mozilla::binding_danger::TErrorResult",
+ "mozilla::binding_danger::AssertAndSuppressCleanupPolicy",
];
let opaque_types = [
"std::pair__PCCP",
"std::namespace::atomic___base", "std::atomic__My_base",
+ "std::atomic___base",
"nsAString_internal_char_traits",
"nsAString_internal_incompatible_char_type",
"nsACString_internal_char_traits",
diff --git a/components/style/gecko/media_queries.rs b/components/style/gecko/media_queries.rs
index b2c57195b90..342baa002f1 100644
--- a/components/style/gecko/media_queries.rs
+++ b/components/style/gecko/media_queries.rs
@@ -8,7 +8,7 @@ use app_units::Au;
use cssparser::{CssStringWriter, Parser, Token};
use euclid::Size2D;
use gecko_bindings::bindings;
-use gecko_bindings::structs::{nsCSSValue, nsCSSUnit, nsStringBuffer, nsresult};
+use gecko_bindings::structs::{nsCSSValue, nsCSSUnit, nsStringBuffer};
use gecko_bindings::structs::{nsMediaExpression_Range, nsMediaFeature};
use gecko_bindings::structs::{nsMediaFeature_ValueType, nsMediaFeature_RangeType, nsMediaFeature_RequirementFlags};
use gecko_bindings::structs::RawGeckoPresContextOwned;
@@ -460,21 +460,12 @@ impl Expression {
/// Returns whether this media query evaluates to true for the given device.
pub fn matches(&self, device: &Device) -> bool {
let mut css_value = nsCSSValue::null();
- let result = unsafe {
+ unsafe {
(self.feature.mGetter.unwrap())(device.pres_context,
self.feature,
&mut css_value)
};
- if result != nsresult::NS_OK {
- // FIXME(emilio): This doesn't seem possible from reading gecko
- // code, probably we should just clean up that function and return
- // void.
- error!("Media feature getter errored: {:?}, {:?}",
- result, Atom::from(unsafe { *self.feature.mName }));
- return false;
- }
-
let value = match MediaExpressionValue::from_css_value(self, &css_value) {
Some(v) => v,
None => return false,
diff --git a/components/style/gecko_bindings/structs_debug.rs b/components/style/gecko_bindings/structs_debug.rs
index 05e522645bd..a9f87d0299e 100644
--- a/components/style/gecko_bindings/structs_debug.rs
+++ b/components/style/gecko_bindings/structs_debug.rs
@@ -994,7 +994,6 @@ pub mod root {
pub const NS_STYLE_DISPLAY_MODE_BROWSER: ::std::os::raw::c_uint = 0;
pub const NS_STYLE_DISPLAY_MODE_MINIMAL_UI: ::std::os::raw::c_uint = 1;
pub const NS_STYLE_DISPLAY_MODE_STANDALONE: ::std::os::raw::c_uint = 2;
- pub const NS_STYLE_DISPLAY_MODE_FULLSCREEN: ::std::os::raw::c_uint = 3;
pub const NS_STYLE_INHERIT_MASK: ::std::os::raw::c_uint = 16777215;
pub const NS_STYLE_HAS_TEXT_DECORATION_LINES: ::std::os::raw::c_uint =
16777216;
@@ -1455,7 +1454,6 @@ pub mod root {
* conceptual!
*/
#[repr(C)]
- #[derive(Debug, Copy, Clone)]
pub struct Pair<A, B> {
pub _address: u8,
pub _phantom_0: ::std::marker::PhantomData<A>,
@@ -1627,6 +1625,10 @@ pub mod root {
pub mod dom {
#[allow(unused_imports)]
use self::super::super::super::root;
+ pub mod binding_detail {
+ #[allow(unused_imports)]
+ use self::super::super::super::super::root;
+ }
#[repr(C)]
#[derive(Debug, Copy)]
pub struct AllOwningUnionBase {
@@ -1837,6 +1839,18 @@ pub mod root {
eRethrowExceptions = 2,
}
#[repr(C)]
+ #[derive(Debug)]
+ pub struct CallbackObject_JSObjectsDropper {
+ pub mHolder: root::RefPtr<root::mozilla::dom::CallbackObject>,
+ }
+ #[test]
+ fn bindgen_test_layout_CallbackObject_JSObjectsDropper() {
+ assert_eq!(::std::mem::size_of::<CallbackObject_JSObjectsDropper>()
+ , 8usize);
+ assert_eq!(::std::mem::align_of::<CallbackObject_JSObjectsDropper>()
+ , 8usize);
+ }
+ #[repr(C)]
#[derive(Debug, Copy)]
pub struct CallbackObject_FastCallbackConstructor {
pub _address: u8,
@@ -1862,7 +1876,7 @@ pub mod root {
pub mAsyncStack: [u64; 4usize],
pub mAsyncStackSetter: [u64; 7usize],
pub mAc: [u64; 4usize],
- pub mErrorResult: *mut [u64; 4usize],
+ pub mErrorResult: *mut root::mozilla::ErrorResult,
pub mExceptionHandling: root::mozilla::dom::CallbackObject_ExceptionHandling,
pub mIsMainThread: bool,
}
@@ -2459,6 +2473,131 @@ pub mod root {
}
#[repr(C)]
#[derive(Debug, Copy)]
+ pub struct ErrorResult {
+ pub _bindgen_opaque_blob: [u64; 4usize],
+ }
+ pub type ErrorResult_BaseErrorResult =
+ root::mozilla::binding_danger::TErrorResult<root::mozilla::binding_danger::AssertAndSuppressCleanupPolicy>;
+ #[test]
+ fn bindgen_test_layout_ErrorResult() {
+ assert_eq!(::std::mem::size_of::<ErrorResult>() , 32usize);
+ assert_eq!(::std::mem::align_of::<ErrorResult>() , 8usize);
+ }
+ impl Clone for ErrorResult {
+ fn clone(&self) -> Self { *self }
+ }
+ pub mod binding_danger {
+ #[allow(unused_imports)]
+ use self::super::super::super::root;
+ /**
+ * Templated implementation class for various ErrorResult-like things. The
+ * instantiations differ only in terms of their cleanup policies (used in the
+ * destructor), which they can specify via the template argument. Note that
+ * this means it's safe to reinterpret_cast between the instantiations unless
+ * you plan to invoke the destructor through such a cast pointer.
+ *
+ * A cleanup policy consists of two booleans: whether to assert that we've been
+ * reported or suppressed, and whether to then go ahead and suppress the
+ * exception.
+ */
+ #[repr(C)]
+ #[derive(Debug)]
+ pub struct TErrorResult<CleanupPolicy> {
+ pub mResult: root::nsresult,
+ pub __bindgen_anon_1: root::mozilla::binding_danger::TErrorResult__bindgen_ty_1<CleanupPolicy>,
+ pub mMightHaveUnreportedJSException: bool,
+ pub mUnionState: root::mozilla::binding_danger::TErrorResult_UnionState,
+ pub _mOwningThread: root::nsAutoOwningThread,
+ pub _phantom_0: ::std::marker::PhantomData<CleanupPolicy>,
+ }
+ pub const TErrorResult_UnionState_HasDOMExceptionInfo:
+ root::mozilla::binding_danger::TErrorResult_UnionState =
+ TErrorResult_UnionState::HasMessage;
+ pub const TErrorResult_UnionState_HasJSException:
+ root::mozilla::binding_danger::TErrorResult_UnionState =
+ TErrorResult_UnionState::HasMessage;
+ pub const TErrorResult_UnionState_HasNothing:
+ root::mozilla::binding_danger::TErrorResult_UnionState =
+ TErrorResult_UnionState::HasMessage;
+ #[repr(i32)]
+ #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
+ pub enum TErrorResult_UnionState { HasMessage = 0, }
+ #[repr(C)]
+ #[derive(Debug, Copy, Clone)]
+ pub struct TErrorResult_Message<CleanupPolicy> {
+ pub _address: u8,
+ pub _phantom_0: ::std::marker::PhantomData<CleanupPolicy>,
+ }
+ #[repr(C)]
+ #[derive(Debug, Copy, Clone)]
+ pub struct TErrorResult_DOMExceptionInfo<CleanupPolicy> {
+ pub _address: u8,
+ pub _phantom_0: ::std::marker::PhantomData<CleanupPolicy>,
+ }
+ #[repr(C)]
+ #[derive(Debug, Copy, Clone)]
+ pub struct TErrorResult__bindgen_ty_1<CleanupPolicy> {
+ pub mMessage: root::__BindgenUnionField<*mut root::mozilla::binding_danger::TErrorResult_Message<CleanupPolicy>>,
+ pub mJSException: root::__BindgenUnionField<root::JS::Value>,
+ pub mDOMExceptionInfo: root::__BindgenUnionField<*mut root::mozilla::binding_danger::TErrorResult_DOMExceptionInfo<CleanupPolicy>>,
+ pub bindgen_union_field: u64,
+ pub _phantom_0: ::std::marker::PhantomData<CleanupPolicy>,
+ }
+ #[repr(C)]
+ #[derive(Debug, Copy)]
+ pub struct JustAssertCleanupPolicy {
+ pub _address: u8,
+ }
+ pub const JustAssertCleanupPolicy_assertHandled: bool = true;
+ pub const JustAssertCleanupPolicy_suppress: bool = false;
+ #[test]
+ fn bindgen_test_layout_JustAssertCleanupPolicy() {
+ assert_eq!(::std::mem::size_of::<JustAssertCleanupPolicy>() ,
+ 1usize);
+ assert_eq!(::std::mem::align_of::<JustAssertCleanupPolicy>() ,
+ 1usize);
+ }
+ impl Clone for JustAssertCleanupPolicy {
+ fn clone(&self) -> Self { *self }
+ }
+ #[repr(C)]
+ #[derive(Debug, Copy)]
+ pub struct AssertAndSuppressCleanupPolicy {
+ pub _address: u8,
+ }
+ pub const AssertAndSuppressCleanupPolicy_assertHandled: bool =
+ true;
+ pub const AssertAndSuppressCleanupPolicy_suppress: bool = true;
+ #[test]
+ fn bindgen_test_layout_AssertAndSuppressCleanupPolicy() {
+ assert_eq!(::std::mem::size_of::<AssertAndSuppressCleanupPolicy>()
+ , 1usize);
+ assert_eq!(::std::mem::align_of::<AssertAndSuppressCleanupPolicy>()
+ , 1usize);
+ }
+ impl Clone for AssertAndSuppressCleanupPolicy {
+ fn clone(&self) -> Self { *self }
+ }
+ #[repr(C)]
+ #[derive(Debug, Copy)]
+ pub struct JustSuppressCleanupPolicy {
+ pub _address: u8,
+ }
+ pub const JustSuppressCleanupPolicy_assertHandled: bool = false;
+ pub const JustSuppressCleanupPolicy_suppress: bool = true;
+ #[test]
+ fn bindgen_test_layout_JustSuppressCleanupPolicy() {
+ assert_eq!(::std::mem::size_of::<JustSuppressCleanupPolicy>()
+ , 1usize);
+ assert_eq!(::std::mem::align_of::<JustSuppressCleanupPolicy>()
+ , 1usize);
+ }
+ impl Clone for JustSuppressCleanupPolicy {
+ fn clone(&self) -> Self { *self }
+ }
+ }
+ #[repr(C)]
+ #[derive(Debug, Copy)]
pub struct ShortcutKeyCandidate {
pub _address: u8,
}
@@ -2694,6 +2833,7 @@ pub mod root {
pub mParsingMode: root::mozilla::css::SheetParsingMode,
pub mType: root::StyleBackendType,
pub mDisabled: bool,
+ pub mDocumentAssociationMode: root::mozilla::StyleSheet_DocumentAssociationMode,
}
pub type StyleSheet_HasThreadSafeRefCnt = root::mozilla::FalseType;
#[repr(C)]
@@ -2711,6 +2851,12 @@ pub mod root {
impl Clone for StyleSheet_cycleCollection {
fn clone(&self) -> Self { *self }
}
+ #[repr(u32)]
+ #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
+ pub enum StyleSheet_DocumentAssociationMode {
+ OwnedByDocument = 0,
+ NotOwnedByDocument = 1,
+ }
extern "C" {
#[link_name = "_ZN7mozilla10StyleSheet21_cycleCollectorGlobalE"]
pub static mut StyleSheet__cycleCollectorGlobal:
@@ -2718,7 +2864,7 @@ pub mod root {
}
#[test]
fn bindgen_test_layout_StyleSheet() {
- assert_eq!(::std::mem::size_of::<StyleSheet>() , 96usize);
+ assert_eq!(::std::mem::size_of::<StyleSheet>() , 104usize);
assert_eq!(::std::mem::align_of::<StyleSheet>() , 8usize);
}
#[repr(C)]
@@ -3145,7 +3291,7 @@ pub mod root {
}
#[repr(u8)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
- pub enum StyleShapeRadius { FarthestSide = 0, ClosestSide = 1, }
+ pub enum StyleShapeRadius { ClosestSide = 0, FarthestSide = 1, }
#[repr(u8)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum StyleShapeSourceType {
@@ -3431,7 +3577,7 @@ pub mod root {
#[derive(Debug)]
pub struct PropertyStyleAnimationValuePair {
pub mProperty: root::nsCSSPropertyID,
- pub mValue: [u64; 2usize],
+ pub mValue: root::mozilla::StyleAnimationValue,
pub mServoValue: root::RefPtr<root::RawServoAnimationValue>,
}
#[test]
@@ -3723,6 +3869,112 @@ pub mod root {
root::mozilla::StyleShapeSource<root::mozilla::StyleGeometryBox>;
pub type StyleShapeOutside =
root::mozilla::StyleShapeSource<root::mozilla::StyleShapeOutsideShapeBox>;
+ /**
+ * Utility class to handle animated style values
+ */
+ #[repr(C)]
+ #[derive(Debug, Copy)]
+ pub struct StyleAnimationValue {
+ pub _bindgen_opaque_blob: [u64; 2usize],
+ }
+ #[repr(u32)]
+ /**
+ * The types and values for the values that we extract and animate.
+ */
+ #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
+ pub enum StyleAnimationValue_Unit {
+ eUnit_Null = 0,
+ eUnit_Normal = 1,
+ eUnit_Auto = 2,
+ eUnit_None = 3,
+ eUnit_Enumerated = 4,
+ eUnit_Visibility = 5,
+ eUnit_Integer = 6,
+ eUnit_Coord = 7,
+ eUnit_Percent = 8,
+ eUnit_Float = 9,
+ eUnit_Color = 10,
+ eUnit_CurrentColor = 11,
+ eUnit_ComplexColor = 12,
+ eUnit_Calc = 13,
+ eUnit_ObjectPosition = 14,
+ eUnit_URL = 15,
+ eUnit_DiscreteCSSValue = 16,
+ eUnit_CSSValuePair = 17,
+ eUnit_CSSValueTriplet = 18,
+ eUnit_CSSRect = 19,
+ eUnit_Dasharray = 20,
+ eUnit_Shadow = 21,
+ eUnit_Shape = 22,
+ eUnit_Filter = 23,
+ eUnit_Transform = 24,
+ eUnit_BackgroundPositionCoord = 25,
+ eUnit_CSSValuePairList = 26,
+ eUnit_UnparsedString = 27,
+ }
+ #[repr(C)]
+ #[derive(Debug, Copy)]
+ pub struct StyleAnimationValue__bindgen_ty_1 {
+ pub mInt: root::__BindgenUnionField<i32>,
+ pub mCoord: root::__BindgenUnionField<root::nscoord>,
+ pub mFloat: root::__BindgenUnionField<f32>,
+ pub mCSSValue: root::__BindgenUnionField<*mut root::nsCSSValue>,
+ pub mCSSValuePair: root::__BindgenUnionField<*mut root::nsCSSValuePair>,
+ pub mCSSValueTriplet: root::__BindgenUnionField<*mut root::nsCSSValueTriplet>,
+ pub mCSSRect: root::__BindgenUnionField<*mut root::nsCSSRect>,
+ pub mCSSValueArray: root::__BindgenUnionField<*mut root::nsCSSValue_Array>,
+ pub mCSSValueList: root::__BindgenUnionField<*mut root::nsCSSValueList>,
+ pub mCSSValueSharedList: root::__BindgenUnionField<*mut root::nsCSSValueSharedList>,
+ pub mCSSValuePairList: root::__BindgenUnionField<*mut root::nsCSSValuePairList>,
+ pub mString: root::__BindgenUnionField<*mut root::nsStringBuffer>,
+ pub mComplexColor: root::__BindgenUnionField<*mut root::mozilla::css::ComplexColorValue>,
+ pub bindgen_union_field: u64,
+ }
+ #[test]
+ fn bindgen_test_layout_StyleAnimationValue__bindgen_ty_1() {
+ assert_eq!(::std::mem::size_of::<StyleAnimationValue__bindgen_ty_1>()
+ , 8usize);
+ assert_eq!(::std::mem::align_of::<StyleAnimationValue__bindgen_ty_1>()
+ , 8usize);
+ }
+ impl Clone for StyleAnimationValue__bindgen_ty_1 {
+ fn clone(&self) -> Self { *self }
+ }
+ #[repr(u32)]
+ #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
+ pub enum StyleAnimationValue_IntegerConstructorType {
+ IntegerConstructor = 0,
+ }
+ #[repr(u32)]
+ #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
+ pub enum StyleAnimationValue_CoordConstructorType {
+ CoordConstructor = 0,
+ }
+ #[repr(u32)]
+ #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
+ pub enum StyleAnimationValue_PercentConstructorType {
+ PercentConstructor = 0,
+ }
+ #[repr(u32)]
+ #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
+ pub enum StyleAnimationValue_FloatConstructorType {
+ FloatConstructor = 0,
+ }
+ #[repr(u32)]
+ #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
+ pub enum StyleAnimationValue_ColorConstructorType {
+ ColorConstructor = 0,
+ }
+ #[test]
+ fn bindgen_test_layout_StyleAnimationValue() {
+ assert_eq!(::std::mem::size_of::<StyleAnimationValue>() ,
+ 16usize);
+ assert_eq!(::std::mem::align_of::<StyleAnimationValue>() ,
+ 8usize);
+ }
+ impl Clone for StyleAnimationValue {
+ fn clone(&self) -> Self { *self }
+ }
#[test]
fn __bindgen_test_layout_template_2() {
assert_eq!(::std::mem::size_of::<root::mozilla::StyleShapeSource<root::mozilla::StyleGeometryBox>>()
@@ -3761,24 +4013,52 @@ pub mod root {
}
pub type pair_first_type<_T1> = _T1;
pub type pair_second_type<_T2> = _T2;
- pub type pair__PCCP = [u8; 0usize];
#[repr(C)]
- #[derive(Debug)]
pub struct atomic<_Tp> {
- pub _M_i: _Tp,
+ pub _base: (),
+ pub _phantom_0: ::std::marker::PhantomData<_Tp>,
}
- pub mod namespace {
- #[allow(unused_imports)]
- use self::super::super::super::root;
+ pub type atomic___base = [u8; 0usize];
+ #[repr(C)]
+ #[derive(Debug, Copy)]
+ pub struct input_iterator_tag {
+ pub _address: u8,
}
- pub mod chrono {
- #[allow(unused_imports)]
- use self::super::super::super::root;
+ impl Clone for input_iterator_tag {
+ fn clone(&self) -> Self { *self }
}
- }
- pub mod __gnu_cxx {
- #[allow(unused_imports)]
- use self::super::super::root;
+ #[repr(C)]
+ #[derive(Debug, Copy)]
+ pub struct forward_iterator_tag {
+ pub _address: u8,
+ }
+ impl Clone for forward_iterator_tag {
+ fn clone(&self) -> Self { *self }
+ }
+ #[repr(C)]
+ #[derive(Debug, Copy)]
+ pub struct bidirectional_iterator_tag {
+ pub _address: u8,
+ }
+ impl Clone for bidirectional_iterator_tag {
+ fn clone(&self) -> Self { *self }
+ }
+ #[repr(C)]
+ #[derive(Debug, Copy)]
+ pub struct random_access_iterator_tag {
+ pub _address: u8,
+ }
+ impl Clone for random_access_iterator_tag {
+ fn clone(&self) -> Self { *self }
+ }
+ #[repr(C)]
+ #[derive(Debug, Copy, Clone)]
+ pub struct __bit_const_reference<_Cp> {
+ pub __seg_: root::std::__bit_const_reference___storage_pointer<_Cp>,
+ pub __mask_: root::std::__bit_const_reference___storage_type<_Cp>,
+ }
+ pub type __bit_const_reference___storage_type<_Cp> = _Cp;
+ pub type __bit_const_reference___storage_pointer<_Cp> = _Cp;
}
/**
* MozRefCountType is Mozilla's reference count type.
@@ -4334,6 +4614,146 @@ pub mod root {
pub mod JS {
#[allow(unused_imports)]
use self::super::super::root;
+ /**
+ * JS::Value is the interface for a single JavaScript Engine value. A few
+ * general notes on JS::Value:
+ *
+ * - JS::Value has setX() and isX() members for X in
+ *
+ * { Int32, Double, String, Symbol, Boolean, Undefined, Null, Object, Magic }
+ *
+ * JS::Value also contains toX() for each of the non-singleton types.
+ *
+ * - Magic is a singleton type whose payload contains either a JSWhyMagic "reason" for
+ * the magic value or a uint32_t value. By providing JSWhyMagic values when
+ * creating and checking for magic values, it is possible to assert, at
+ * runtime, that only magic values with the expected reason flow through a
+ * particular value. For example, if cx->exception has a magic value, the
+ * reason must be JS_GENERATOR_CLOSING.
+ *
+ * - The JS::Value operations are preferred. The JSVAL_* operations remain for
+ * compatibility; they may be removed at some point. These operations mostly
+ * provide similar functionality. But there are a few key differences. One
+ * is that JS::Value gives null a separate type.
+ * Also, to help prevent mistakenly boxing a nullable JSObject* as an object,
+ * Value::setObject takes a JSObject&. (Conversely, Value::toObject returns a
+ * JSObject&.) A convenience member Value::setObjectOrNull is provided.
+ *
+ * - JSVAL_VOID is the same as the singleton value of the Undefined type.
+ *
+ * - Note that JS::Value is 8 bytes on 32 and 64-bit architectures. Thus, on
+ * 32-bit user code should avoid copying jsval/JS::Value as much as possible,
+ * preferring to pass by const Value&.
+ */
+ #[repr(C)]
+ #[derive(Debug, Copy)]
+ pub struct Value {
+ pub data: root::JS::Value_layout,
+ }
+ pub type Value_PayloadType = u64;
+ #[repr(C)]
+ #[derive(Debug, Copy)]
+ pub struct Value_layout {
+ pub asBits: root::__BindgenUnionField<u64>,
+ pub debugView: root::__BindgenUnionField<root::JS::Value_layout__bindgen_ty_1>,
+ pub s: root::__BindgenUnionField<root::JS::Value_layout__bindgen_ty_2>,
+ pub asDouble: root::__BindgenUnionField<f64>,
+ pub asPtr: root::__BindgenUnionField<*mut ::std::os::raw::c_void>,
+ pub asWord: root::__BindgenUnionField<usize>,
+ pub asUIntPtr: root::__BindgenUnionField<usize>,
+ pub bindgen_union_field: u64,
+ }
+ #[repr(C)]
+ #[derive(Debug, Copy)]
+ pub struct Value_layout__bindgen_ty_1 {
+ pub _bitfield_1: u64,
+ }
+ #[test]
+ fn bindgen_test_layout_Value_layout__bindgen_ty_1() {
+ assert_eq!(::std::mem::size_of::<Value_layout__bindgen_ty_1>() ,
+ 8usize);
+ assert_eq!(::std::mem::align_of::<Value_layout__bindgen_ty_1>() ,
+ 8usize);
+ }
+ impl Clone for Value_layout__bindgen_ty_1 {
+ fn clone(&self) -> Self { *self }
+ }
+ impl Value_layout__bindgen_ty_1 {
+ #[inline]
+ pub fn payload47(&self) -> u64 {
+ unsafe {
+ ::std::mem::transmute(((self._bitfield_1 &
+ (140737488355327usize as u64))
+ >> 0u32) as u64)
+ }
+ }
+ #[inline]
+ pub fn set_payload47(&mut self, val: u64) {
+ self._bitfield_1 &= !(140737488355327usize as u64);
+ self._bitfield_1 |=
+ ((val as u64 as u64) << 0u32) &
+ (140737488355327usize as u64);
+ }
+ #[inline]
+ pub fn tag(&self) -> root::JSValueTag {
+ unsafe {
+ ::std::mem::transmute(((self._bitfield_1 &
+ (18446603336221196288usize as
+ u64)) >> 47u32) as u32)
+ }
+ }
+ #[inline]
+ pub fn set_tag(&mut self, val: root::JSValueTag) {
+ self._bitfield_1 &= !(18446603336221196288usize as u64);
+ self._bitfield_1 |=
+ ((val as u32 as u64) << 47u32) &
+ (18446603336221196288usize as u64);
+ }
+ }
+ #[repr(C)]
+ #[derive(Debug, Copy)]
+ pub struct Value_layout__bindgen_ty_2 {
+ pub payload: root::JS::Value_layout__bindgen_ty_2__bindgen_ty_1,
+ }
+ #[repr(C)]
+ #[derive(Debug, Copy)]
+ pub struct Value_layout__bindgen_ty_2__bindgen_ty_1 {
+ pub i32: root::__BindgenUnionField<i32>,
+ pub u32: root::__BindgenUnionField<u32>,
+ pub why: root::__BindgenUnionField<root::JSWhyMagic>,
+ pub bindgen_union_field: u32,
+ }
+ #[test]
+ fn bindgen_test_layout_Value_layout__bindgen_ty_2__bindgen_ty_1() {
+ assert_eq!(::std::mem::size_of::<Value_layout__bindgen_ty_2__bindgen_ty_1>()
+ , 4usize);
+ assert_eq!(::std::mem::align_of::<Value_layout__bindgen_ty_2__bindgen_ty_1>()
+ , 4usize);
+ }
+ impl Clone for Value_layout__bindgen_ty_2__bindgen_ty_1 {
+ fn clone(&self) -> Self { *self }
+ }
+ #[test]
+ fn bindgen_test_layout_Value_layout__bindgen_ty_2() {
+ assert_eq!(::std::mem::size_of::<Value_layout__bindgen_ty_2>() ,
+ 4usize);
+ assert_eq!(::std::mem::align_of::<Value_layout__bindgen_ty_2>() ,
+ 4usize);
+ }
+ impl Clone for Value_layout__bindgen_ty_2 {
+ fn clone(&self) -> Self { *self }
+ }
+ #[test]
+ fn bindgen_test_layout_Value_layout() {
+ assert_eq!(::std::mem::size_of::<Value_layout>() , 8usize);
+ assert_eq!(::std::mem::align_of::<Value_layout>() , 8usize);
+ }
+ impl Clone for Value_layout {
+ fn clone(&self) -> Self { *self }
+ }
+ impl Clone for Value {
+ fn clone(&self) -> Self { *self }
+ }
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct DeletePolicy<T> {
@@ -4461,6 +4881,11 @@ pub mod root {
pub enum TenuredHeap__bindgen_ty_1 { maskBits = 0, }
#[test]
fn __bindgen_test_layout_template_4() {
+ assert_eq!(::std::mem::size_of::<[u64; 3usize]>() , 24usize);
+ assert_eq!(::std::mem::align_of::<[u64; 3usize]>() , 8usize);
+ }
+ #[test]
+ fn __bindgen_test_layout_template_5() {
assert_eq!(::std::mem::size_of::<root::mozilla::UniquePtr<*mut ::std::os::raw::c_char,
root::JS::FreePolicy>>()
, 8usize);
@@ -4538,6 +4963,42 @@ pub mod root {
impl Clone for JSCompartment {
fn clone(&self) -> Self { *self }
}
+ #[repr(u32)]
+ #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
+ pub enum JSValueTag {
+ JSVAL_TAG_MAX_DOUBLE = 131056,
+ JSVAL_TAG_INT32 = 131057,
+ JSVAL_TAG_UNDEFINED = 131058,
+ JSVAL_TAG_NULL = 131059,
+ JSVAL_TAG_BOOLEAN = 131060,
+ JSVAL_TAG_MAGIC = 131061,
+ JSVAL_TAG_STRING = 131062,
+ JSVAL_TAG_SYMBOL = 131063,
+ JSVAL_TAG_PRIVATE_GCTHING = 131064,
+ JSVAL_TAG_OBJECT = 131068,
+ }
+ #[repr(u32)]
+ #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
+ pub enum JSWhyMagic {
+ JS_ELEMENTS_HOLE = 0,
+ JS_NO_ITER_VALUE = 1,
+ JS_GENERATOR_CLOSING = 2,
+ JS_NO_CONSTANT = 3,
+ JS_THIS_POISON = 4,
+ JS_ARG_POISON = 5,
+ JS_SERIALIZE_NO_NODE = 6,
+ JS_LAZY_ARGUMENTS = 7,
+ JS_OPTIMIZED_ARGUMENTS = 8,
+ JS_IS_CONSTRUCTING = 9,
+ JS_BLOCK_NEEDS_CLONE = 10,
+ JS_HASH_KEY_EMPTY = 11,
+ JS_ION_ERROR = 12,
+ JS_ION_BAILOUT = 13,
+ JS_OPTIMIZED_OUT = 14,
+ JS_UNINITIALIZED_LEXICAL = 15,
+ JS_GENERIC_MAGIC = 16,
+ JS_WHY_MAGIC_COUNT = 17,
+ }
#[repr(C)]
#[derive(Debug)]
pub struct nsAString_internal {
@@ -4866,13 +5327,13 @@ pub mod root {
pub _phantom_0: ::std::marker::PhantomData<CharT>,
}
#[test]
- fn __bindgen_test_layout_template_5() {
+ fn __bindgen_test_layout_template_6() {
assert_eq!(::std::mem::size_of::<root::nsCharTraits<u16>>() , 1usize);
assert_eq!(::std::mem::align_of::<root::nsCharTraits<u16>>() ,
1usize);
}
#[test]
- fn __bindgen_test_layout_template_6() {
+ fn __bindgen_test_layout_template_7() {
assert_eq!(::std::mem::size_of::<root::nsCharTraits<::std::os::raw::c_char>>()
, 1usize);
assert_eq!(::std::mem::align_of::<root::nsCharTraits<::std::os::raw::c_char>>()
@@ -5089,7 +5550,7 @@ pub mod root {
pub mRawPtr: *mut root::nsISupports,
}
#[test]
- fn __bindgen_test_layout_template_7() {
+ fn __bindgen_test_layout_template_8() {
assert_eq!(::std::mem::size_of::<root::nsCOMPtr<root::nsISupports>>()
, 8usize);
assert_eq!(::std::mem::align_of::<root::nsCOMPtr<root::nsISupports>>()
@@ -5594,7 +6055,7 @@ pub mod root {
pub _base_1: root::mozilla::dom::DispatcherTrait,
pub mDeprecationWarnedAbout: u64,
pub mDocWarningWarnedAbout: u64,
- pub mSelectorCache: [u64; 16usize],
+ pub mSelectorCache: root::nsIDocument_SelectorCache,
pub mReferrer: root::nsCString,
pub mLastModified: ::nsstring::nsStringRepr,
pub mDocumentURI: root::nsCOMPtr<root::nsIURI>,
@@ -5756,7 +6217,7 @@ pub mod root {
fn clone(&self) -> Self { *self }
}
#[repr(C)]
- #[derive(Debug)]
+ #[derive(Debug, Copy)]
pub struct nsIDocument_SelectorCache {
pub _bindgen_opaque_blob: [u64; 16usize],
}
@@ -5767,6 +6228,9 @@ pub mod root {
assert_eq!(::std::mem::align_of::<nsIDocument_SelectorCache>() ,
8usize);
}
+ impl Clone for nsIDocument_SelectorCache {
+ fn clone(&self) -> Self { *self }
+ }
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum nsIDocument_additionalSheetType {
@@ -7024,6 +7488,20 @@ pub mod root {
eCompatibility_AlmostStandards = 2,
eCompatibility_NavQuirks = 3,
}
+ #[repr(C)]
+ #[derive(Debug, Copy)]
+ pub struct gfxSize {
+ pub _bindgen_opaque_blob: [u64; 2usize],
+ }
+ pub type gfxSize_Super = [u64; 2usize];
+ #[test]
+ fn bindgen_test_layout_gfxSize() {
+ assert_eq!(::std::mem::size_of::<gfxSize>() , 16usize);
+ assert_eq!(::std::mem::align_of::<gfxSize>() , 8usize);
+ }
+ impl Clone for gfxSize {
+ fn clone(&self) -> Self { *self }
+ }
pub type nscolor = u32;
#[repr(C)]
#[derive(Debug)]
@@ -7053,7 +7531,7 @@ pub mod root {
pub mTextZoom: f32,
pub mFullZoom: f32,
pub mOverrideDPPX: f32,
- pub mLastFontInflationScreenSize: [u64; 2usize],
+ pub mLastFontInflationScreenSize: root::gfxSize,
pub mCurAppUnitsPerDevPixel: i32,
pub mAutoQualityMinFontSizePixelsPref: i32,
pub mTheme: root::nsCOMPtr<root::nsITheme>,
@@ -8311,7 +8789,7 @@ pub mod root {
root::mozilla::dom::OwningNodeOrString;
pub type nsINode_TextOrElementOrDocument =
root::mozilla::dom::TextOrElementOrDocument;
- pub type nsINode_ErrorResult = [u64; 4usize];
+ pub type nsINode_ErrorResult = root::mozilla::ErrorResult;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct nsINode_COMTypeInfo<T, U> {
@@ -8522,7 +9000,7 @@ pub mod root {
pub mArray: root::nsTArray<root::nsAutoPtr<root::nsMediaQuery>>,
pub mStyleSheet: *mut root::mozilla::StyleSheet,
}
- pub type nsMediaList_ErrorResult = [u64; 4usize];
+ pub type nsMediaList_ErrorResult = root::mozilla::ErrorResult;
pub type nsMediaList_HasThreadSafeRefCnt = root::mozilla::FalseType;
#[repr(C)]
#[derive(Debug, Copy)]
@@ -8774,7 +9252,7 @@ pub mod root {
}
pub type nsDOMAttributeMap_Attr = root::mozilla::dom::Attr;
pub type nsDOMAttributeMap_Element = root::mozilla::dom::Element;
- pub type nsDOMAttributeMap_ErrorResult = [u64; 4usize];
+ pub type nsDOMAttributeMap_ErrorResult = root::mozilla::ErrorResult;
pub type nsDOMAttributeMap_HasThreadSafeRefCnt = root::mozilla::FalseType;
#[repr(C)]
#[derive(Debug, Copy)]
@@ -9317,63 +9795,63 @@ pub mod root {
impl Clone for nsDOMMutationObserver {
fn clone(&self) -> Self { *self }
}
- pub const NODE_HAS_LISTENERMANAGER: root::_bindgen_ty_137 =
- _bindgen_ty_137::NODE_HAS_LISTENERMANAGER;
- pub const NODE_HAS_PROPERTIES: root::_bindgen_ty_137 =
- _bindgen_ty_137::NODE_HAS_PROPERTIES;
- pub const NODE_IS_ANONYMOUS_ROOT: root::_bindgen_ty_137 =
- _bindgen_ty_137::NODE_IS_ANONYMOUS_ROOT;
- pub const NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE: root::_bindgen_ty_137 =
- _bindgen_ty_137::NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE;
- pub const NODE_IS_NATIVE_ANONYMOUS_ROOT: root::_bindgen_ty_137 =
- _bindgen_ty_137::NODE_IS_NATIVE_ANONYMOUS_ROOT;
- pub const NODE_FORCE_XBL_BINDINGS: root::_bindgen_ty_137 =
- _bindgen_ty_137::NODE_FORCE_XBL_BINDINGS;
- pub const NODE_MAY_BE_IN_BINDING_MNGR: root::_bindgen_ty_137 =
- _bindgen_ty_137::NODE_MAY_BE_IN_BINDING_MNGR;
- pub const NODE_IS_EDITABLE: root::_bindgen_ty_137 =
- _bindgen_ty_137::NODE_IS_EDITABLE;
- pub const NODE_MAY_HAVE_CLASS: root::_bindgen_ty_137 =
- _bindgen_ty_137::NODE_MAY_HAVE_CLASS;
- pub const NODE_IS_IN_SHADOW_TREE: root::_bindgen_ty_137 =
- _bindgen_ty_137::NODE_IS_IN_SHADOW_TREE;
- pub const NODE_HAS_EMPTY_SELECTOR: root::_bindgen_ty_137 =
- _bindgen_ty_137::NODE_HAS_EMPTY_SELECTOR;
- pub const NODE_HAS_SLOW_SELECTOR: root::_bindgen_ty_137 =
- _bindgen_ty_137::NODE_HAS_SLOW_SELECTOR;
- pub const NODE_HAS_EDGE_CHILD_SELECTOR: root::_bindgen_ty_137 =
- _bindgen_ty_137::NODE_HAS_EDGE_CHILD_SELECTOR;
- pub const NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS: root::_bindgen_ty_137 =
- _bindgen_ty_137::NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS;
- pub const NODE_ALL_SELECTOR_FLAGS: root::_bindgen_ty_137 =
- _bindgen_ty_137::NODE_ALL_SELECTOR_FLAGS;
- pub const NODE_NEEDS_FRAME: root::_bindgen_ty_137 =
- _bindgen_ty_137::NODE_NEEDS_FRAME;
- pub const NODE_DESCENDANTS_NEED_FRAMES: root::_bindgen_ty_137 =
- _bindgen_ty_137::NODE_DESCENDANTS_NEED_FRAMES;
- pub const NODE_HAS_ACCESSKEY: root::_bindgen_ty_137 =
- _bindgen_ty_137::NODE_HAS_ACCESSKEY;
- pub const NODE_HAS_DIRECTION_RTL: root::_bindgen_ty_137 =
- _bindgen_ty_137::NODE_HAS_DIRECTION_RTL;
- pub const NODE_HAS_DIRECTION_LTR: root::_bindgen_ty_137 =
- _bindgen_ty_137::NODE_HAS_DIRECTION_LTR;
- pub const NODE_ALL_DIRECTION_FLAGS: root::_bindgen_ty_137 =
- _bindgen_ty_137::NODE_ALL_DIRECTION_FLAGS;
- pub const NODE_CHROME_ONLY_ACCESS: root::_bindgen_ty_137 =
- _bindgen_ty_137::NODE_CHROME_ONLY_ACCESS;
- pub const NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS: root::_bindgen_ty_137 =
- _bindgen_ty_137::NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS;
- pub const NODE_SHARED_RESTYLE_BIT_1: root::_bindgen_ty_137 =
- _bindgen_ty_137::NODE_SHARED_RESTYLE_BIT_1;
- pub const NODE_SHARED_RESTYLE_BIT_2: root::_bindgen_ty_137 =
- _bindgen_ty_137::NODE_SHARED_RESTYLE_BIT_2;
- pub const NODE_HAS_DIRTY_DESCENDANTS_FOR_SERVO: root::_bindgen_ty_137 =
- _bindgen_ty_137::NODE_SHARED_RESTYLE_BIT_1;
- pub const NODE_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_137 =
- _bindgen_ty_137::NODE_TYPE_SPECIFIC_BITS_OFFSET;
+ pub const NODE_HAS_LISTENERMANAGER: root::_bindgen_ty_34 =
+ _bindgen_ty_34::NODE_HAS_LISTENERMANAGER;
+ pub const NODE_HAS_PROPERTIES: root::_bindgen_ty_34 =
+ _bindgen_ty_34::NODE_HAS_PROPERTIES;
+ pub const NODE_IS_ANONYMOUS_ROOT: root::_bindgen_ty_34 =
+ _bindgen_ty_34::NODE_IS_ANONYMOUS_ROOT;
+ pub const NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE: root::_bindgen_ty_34 =
+ _bindgen_ty_34::NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE;
+ pub const NODE_IS_NATIVE_ANONYMOUS_ROOT: root::_bindgen_ty_34 =
+ _bindgen_ty_34::NODE_IS_NATIVE_ANONYMOUS_ROOT;
+ pub const NODE_FORCE_XBL_BINDINGS: root::_bindgen_ty_34 =
+ _bindgen_ty_34::NODE_FORCE_XBL_BINDINGS;
+ pub const NODE_MAY_BE_IN_BINDING_MNGR: root::_bindgen_ty_34 =
+ _bindgen_ty_34::NODE_MAY_BE_IN_BINDING_MNGR;
+ pub const NODE_IS_EDITABLE: root::_bindgen_ty_34 =
+ _bindgen_ty_34::NODE_IS_EDITABLE;
+ pub const NODE_MAY_HAVE_CLASS: root::_bindgen_ty_34 =
+ _bindgen_ty_34::NODE_MAY_HAVE_CLASS;
+ pub const NODE_IS_IN_SHADOW_TREE: root::_bindgen_ty_34 =
+ _bindgen_ty_34::NODE_IS_IN_SHADOW_TREE;
+ pub const NODE_HAS_EMPTY_SELECTOR: root::_bindgen_ty_34 =
+ _bindgen_ty_34::NODE_HAS_EMPTY_SELECTOR;
+ pub const NODE_HAS_SLOW_SELECTOR: root::_bindgen_ty_34 =
+ _bindgen_ty_34::NODE_HAS_SLOW_SELECTOR;
+ pub const NODE_HAS_EDGE_CHILD_SELECTOR: root::_bindgen_ty_34 =
+ _bindgen_ty_34::NODE_HAS_EDGE_CHILD_SELECTOR;
+ pub const NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS: root::_bindgen_ty_34 =
+ _bindgen_ty_34::NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS;
+ pub const NODE_ALL_SELECTOR_FLAGS: root::_bindgen_ty_34 =
+ _bindgen_ty_34::NODE_ALL_SELECTOR_FLAGS;
+ pub const NODE_NEEDS_FRAME: root::_bindgen_ty_34 =
+ _bindgen_ty_34::NODE_NEEDS_FRAME;
+ pub const NODE_DESCENDANTS_NEED_FRAMES: root::_bindgen_ty_34 =
+ _bindgen_ty_34::NODE_DESCENDANTS_NEED_FRAMES;
+ pub const NODE_HAS_ACCESSKEY: root::_bindgen_ty_34 =
+ _bindgen_ty_34::NODE_HAS_ACCESSKEY;
+ pub const NODE_HAS_DIRECTION_RTL: root::_bindgen_ty_34 =
+ _bindgen_ty_34::NODE_HAS_DIRECTION_RTL;
+ pub const NODE_HAS_DIRECTION_LTR: root::_bindgen_ty_34 =
+ _bindgen_ty_34::NODE_HAS_DIRECTION_LTR;
+ pub const NODE_ALL_DIRECTION_FLAGS: root::_bindgen_ty_34 =
+ _bindgen_ty_34::NODE_ALL_DIRECTION_FLAGS;
+ pub const NODE_CHROME_ONLY_ACCESS: root::_bindgen_ty_34 =
+ _bindgen_ty_34::NODE_CHROME_ONLY_ACCESS;
+ pub const NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS: root::_bindgen_ty_34 =
+ _bindgen_ty_34::NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS;
+ pub const NODE_SHARED_RESTYLE_BIT_1: root::_bindgen_ty_34 =
+ _bindgen_ty_34::NODE_SHARED_RESTYLE_BIT_1;
+ pub const NODE_SHARED_RESTYLE_BIT_2: root::_bindgen_ty_34 =
+ _bindgen_ty_34::NODE_SHARED_RESTYLE_BIT_2;
+ pub const NODE_HAS_DIRTY_DESCENDANTS_FOR_SERVO: root::_bindgen_ty_34 =
+ _bindgen_ty_34::NODE_SHARED_RESTYLE_BIT_1;
+ pub const NODE_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_34 =
+ _bindgen_ty_34::NODE_TYPE_SPECIFIC_BITS_OFFSET;
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
- pub enum _bindgen_ty_137 {
+ pub enum _bindgen_ty_34 {
NODE_HAS_LISTENERMANAGER = 4,
NODE_HAS_PROPERTIES = 8,
NODE_IS_ANONYMOUS_ROOT = 16,
@@ -10192,21 +10670,21 @@ pub mod root {
}
#[repr(C)]
#[derive(Debug, Copy)]
- pub struct _bindgen_ty_25 {
+ pub struct _bindgen_ty_10 {
pub mInt: root::__BindgenUnionField<i32>,
pub mFloat: root::__BindgenUnionField<f32>,
pub mPointer: root::__BindgenUnionField<*mut ::std::os::raw::c_void>,
pub bindgen_union_field: u64,
}
#[test]
- fn bindgen_test_layout__bindgen_ty_25() {
- assert_eq!(::std::mem::size_of::<_bindgen_ty_25>() , 8usize);
- assert_eq!(::std::mem::align_of::<_bindgen_ty_25>() , 8usize);
+ fn bindgen_test_layout__bindgen_ty_10() {
+ assert_eq!(::std::mem::size_of::<_bindgen_ty_10>() , 8usize);
+ assert_eq!(::std::mem::align_of::<_bindgen_ty_10>() , 8usize);
}
- impl Clone for _bindgen_ty_25 {
+ impl Clone for _bindgen_ty_10 {
fn clone(&self) -> Self { *self }
}
- pub type nsStyleUnion = root::_bindgen_ty_25;
+ pub type nsStyleUnion = root::_bindgen_ty_10;
/**
* Class that hold a single size specification used by the style
* system. The size specification consists of two parts -- a number
@@ -13211,7 +13689,7 @@ pub mod root {
assert_eq!(::std::mem::align_of::<nsCSSValueFloatColor>() , 8usize);
}
#[test]
- fn __bindgen_test_layout_template_8() {
+ fn __bindgen_test_layout_template_9() {
assert_eq!(::std::mem::size_of::<root::mozilla::UniquePtr<root::nsCSSValueList,
root::mozilla::DefaultDelete<root::nsCSSValueList>>>()
, 8usize);
@@ -13220,7 +13698,7 @@ pub mod root {
, 8usize);
}
#[test]
- fn __bindgen_test_layout_template_9() {
+ fn __bindgen_test_layout_template_10() {
assert_eq!(::std::mem::size_of::<root::mozilla::UniquePtr<root::nsCSSValuePairList,
root::mozilla::DefaultDelete<root::nsCSSValuePairList>>>()
, 8usize);
@@ -13602,7 +14080,7 @@ pub mod root {
assert_eq!(::std::mem::align_of::<CachedBorderImageData>() , 8usize);
}
#[test]
- fn __bindgen_test_layout_template_10() {
+ fn __bindgen_test_layout_template_11() {
assert_eq!(::std::mem::size_of::<root::mozilla::UniquePtr<root::nsStyleSides,
root::mozilla::DefaultDelete<root::nsStyleSides>>>()
, 8usize);
@@ -14847,8 +15325,7 @@ pub mod root {
aFeature:
*const root::nsMediaFeature,
aResult:
- *mut root::nsCSSValue)
- -> root::nsresult>;
+ *mut root::nsCSSValue)>;
#[repr(C)]
#[derive(Debug, Copy)]
pub struct nsMediaFeatures {
@@ -14897,201 +15374,247 @@ pub mod root {
assert_eq!(::std::mem::align_of::<nsMediaQuery>() , 8usize);
}
#[test]
- fn __bindgen_test_layout_template_11() {
+ fn __bindgen_test_layout_template_12() {
assert_eq!(::std::mem::size_of::<root::JS::TenuredHeap<*mut root::JSObject>>()
, 8usize);
assert_eq!(::std::mem::align_of::<root::JS::TenuredHeap<*mut root::JSObject>>()
, 8usize);
}
#[test]
- fn __bindgen_test_layout_template_12() {
+ fn __bindgen_test_layout_template_13() {
assert_eq!(::std::mem::size_of::<root::JS::Heap<*mut root::JSObject>>()
, 8usize);
assert_eq!(::std::mem::align_of::<root::JS::Heap<*mut root::JSObject>>()
, 8usize);
}
#[test]
- fn __bindgen_test_layout_template_13() {
+ fn __bindgen_test_layout_template_14() {
assert_eq!(::std::mem::size_of::<root::nsTArray<root::nsCString>>() ,
8usize);
assert_eq!(::std::mem::align_of::<root::nsTArray<root::nsCString>>() ,
8usize);
}
#[test]
- fn __bindgen_test_layout_template_14() {
+ fn __bindgen_test_layout_template_15() {
+ assert_eq!(::std::mem::size_of::<root::mozilla::binding_danger::TErrorResult<root::mozilla::binding_danger::AssertAndSuppressCleanupPolicy>>()
+ , 32usize);
+ assert_eq!(::std::mem::align_of::<root::mozilla::binding_danger::TErrorResult<root::mozilla::binding_danger::AssertAndSuppressCleanupPolicy>>()
+ , 8usize);
+ }
+ #[test]
+ fn __bindgen_test_layout_template_16() {
+ assert_eq!(::std::mem::size_of::<root::mozilla::binding_danger::TErrorResult<root::mozilla::binding_danger::JustSuppressCleanupPolicy>>()
+ , 32usize);
+ assert_eq!(::std::mem::align_of::<root::mozilla::binding_danger::TErrorResult<root::mozilla::binding_danger::JustSuppressCleanupPolicy>>()
+ , 8usize);
+ }
+ #[test]
+ fn __bindgen_test_layout_template_17() {
+ assert_eq!(::std::mem::size_of::<root::mozilla::binding_danger::TErrorResult<root::mozilla::binding_danger::JustAssertCleanupPolicy>>()
+ , 32usize);
+ assert_eq!(::std::mem::align_of::<root::mozilla::binding_danger::TErrorResult<root::mozilla::binding_danger::JustAssertCleanupPolicy>>()
+ , 8usize);
+ }
+ #[test]
+ fn __bindgen_test_layout_template_18() {
assert_eq!(::std::mem::size_of::<root::nsCOMPtr<root::nsIPrincipal>>()
, 8usize);
assert_eq!(::std::mem::align_of::<root::nsCOMPtr<root::nsIPrincipal>>()
, 8usize);
}
#[test]
- fn __bindgen_test_layout_template_15() {
+ fn __bindgen_test_layout_template_19() {
+ assert_eq!(::std::mem::size_of::<[u64; 29usize]>() , 232usize);
+ assert_eq!(::std::mem::align_of::<[u64; 29usize]>() , 8usize);
+ }
+ #[test]
+ fn __bindgen_test_layout_template_20() {
assert_eq!(::std::mem::size_of::<root::RefPtr<root::mozilla::dom::Element>>()
, 8usize);
assert_eq!(::std::mem::align_of::<root::RefPtr<root::mozilla::dom::Element>>()
, 8usize);
}
#[test]
- fn __bindgen_test_layout_template_16() {
+ fn __bindgen_test_layout_template_21() {
assert_eq!(::std::mem::size_of::<root::nsTArray<root::RefPtr<root::mozilla::dom::Element>>>()
, 8usize);
assert_eq!(::std::mem::align_of::<root::nsTArray<root::RefPtr<root::mozilla::dom::Element>>>()
, 8usize);
}
#[test]
- fn __bindgen_test_layout_template_17() {
+ fn __bindgen_test_layout_template_22() {
assert_eq!(::std::mem::size_of::<root::nsCOMPtr<root::nsIObserver>>()
, 8usize);
assert_eq!(::std::mem::align_of::<root::nsCOMPtr<root::nsIObserver>>()
, 8usize);
}
#[test]
- fn __bindgen_test_layout_template_18() {
+ fn __bindgen_test_layout_template_23() {
assert_eq!(::std::mem::size_of::<root::nsCOMPtr<root::nsIWeakReference>>()
, 8usize);
assert_eq!(::std::mem::align_of::<root::nsCOMPtr<root::nsIWeakReference>>()
, 8usize);
}
#[test]
- fn __bindgen_test_layout_template_19() {
+ fn __bindgen_test_layout_template_24() {
+ assert_eq!(::std::mem::size_of::<u64>() , 8usize);
+ assert_eq!(::std::mem::align_of::<u64>() , 8usize);
+ }
+ #[test]
+ fn __bindgen_test_layout_template_25() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>()
, 8usize);
assert_eq!(::std::mem::align_of::<root::nsTArray<*mut root::nsIContent>>()
, 8usize);
}
#[test]
- fn __bindgen_test_layout_template_20() {
+ fn __bindgen_test_layout_template_26() {
assert_eq!(::std::mem::size_of::<root::nsTArray<::nsstring::nsStringRepr>>() ,
8usize);
assert_eq!(::std::mem::align_of::<root::nsTArray<::nsstring::nsStringRepr>>() ,
8usize);
}
#[test]
- fn __bindgen_test_layout_template_21() {
+ fn __bindgen_test_layout_template_27() {
+ assert_eq!(::std::mem::size_of::<[u64; 6usize]>() , 48usize);
+ assert_eq!(::std::mem::align_of::<[u64; 6usize]>() , 8usize);
+ }
+ #[test]
+ fn __bindgen_test_layout_template_28() {
assert_eq!(::std::mem::size_of::<root::mozilla::DefaultDelete<root::mozilla::dom::TimeoutManager>>()
, 1usize);
assert_eq!(::std::mem::align_of::<root::mozilla::DefaultDelete<root::mozilla::dom::TimeoutManager>>()
, 1usize);
}
#[test]
- fn __bindgen_test_layout_template_22() {
+ fn __bindgen_test_layout_template_29() {
assert_eq!(::std::mem::size_of::<root::nsCOMPtr<root::nsIRunnable>>()
, 8usize);
assert_eq!(::std::mem::align_of::<root::nsCOMPtr<root::nsIRunnable>>()
, 8usize);
}
#[test]
- fn __bindgen_test_layout_template_23() {
+ fn __bindgen_test_layout_template_30() {
assert_eq!(::std::mem::size_of::<root::nsAutoPtr<root::nsMediaQuery>>()
, 8usize);
assert_eq!(::std::mem::align_of::<root::nsAutoPtr<root::nsMediaQuery>>()
, 8usize);
}
#[test]
- fn __bindgen_test_layout_template_24() {
+ fn __bindgen_test_layout_template_31() {
assert_eq!(::std::mem::size_of::<root::mozilla::OwningNonNull<root::nsINode>>()
, 16usize);
assert_eq!(::std::mem::align_of::<root::mozilla::OwningNonNull<root::nsINode>>()
, 8usize);
}
#[test]
- fn __bindgen_test_layout_template_25() {
+ fn __bindgen_test_layout_template_32() {
assert_eq!(::std::mem::size_of::<root::nsTArray<f64>>() , 8usize);
assert_eq!(::std::mem::align_of::<root::nsTArray<f64>>() , 8usize);
}
#[test]
- fn __bindgen_test_layout_template_26() {
+ fn __bindgen_test_layout_template_33() {
assert_eq!(::std::mem::size_of::<root::RefPtr<root::mozilla::dom::DOMIntersectionObserverEntry>>()
, 8usize);
assert_eq!(::std::mem::align_of::<root::RefPtr<root::mozilla::dom::DOMIntersectionObserverEntry>>()
, 8usize);
}
#[test]
- fn __bindgen_test_layout_template_27() {
+ fn __bindgen_test_layout_template_34() {
assert_eq!(::std::mem::size_of::<root::nsTArray<root::RefPtr<root::mozilla::dom::DOMIntersectionObserverEntry>>>()
, 8usize);
assert_eq!(::std::mem::align_of::<root::nsTArray<root::RefPtr<root::mozilla::dom::DOMIntersectionObserverEntry>>>()
, 8usize);
}
#[test]
- fn __bindgen_test_layout_template_28() {
+ fn __bindgen_test_layout_template_35() {
assert_eq!(::std::mem::size_of::<root::nsMainThreadPtrHolder<root::nsIURI>>()
, 24usize);
assert_eq!(::std::mem::align_of::<root::nsMainThreadPtrHolder<root::nsIURI>>()
, 8usize);
}
#[test]
- fn __bindgen_test_layout_template_29() {
+ fn __bindgen_test_layout_template_36() {
assert_eq!(::std::mem::size_of::<root::nsMainThreadPtrHolder<root::nsIPrincipal>>()
, 24usize);
assert_eq!(::std::mem::align_of::<root::nsMainThreadPtrHolder<root::nsIPrincipal>>()
, 8usize);
}
#[test]
- fn __bindgen_test_layout_template_30() {
+ fn __bindgen_test_layout_template_37() {
assert_eq!(::std::mem::size_of::<root::nsPtrHashKey<root::nsIFrame>>()
, 16usize);
assert_eq!(::std::mem::align_of::<root::nsPtrHashKey<root::nsIFrame>>()
, 8usize);
}
#[test]
- fn __bindgen_test_layout_template_31() {
+ fn __bindgen_test_layout_template_38() {
assert_eq!(::std::mem::size_of::<root::nsTArray<root::mozilla::DisplayItemClip_RoundedRect>>()
, 8usize);
assert_eq!(::std::mem::align_of::<root::nsTArray<root::mozilla::DisplayItemClip_RoundedRect>>()
, 8usize);
}
#[test]
- fn __bindgen_test_layout_template_32() {
+ fn __bindgen_test_layout_template_39() {
assert_eq!(::std::mem::size_of::<root::RefPtr<root::mozilla::dom::DOMRect>>()
, 8usize);
assert_eq!(::std::mem::align_of::<root::RefPtr<root::mozilla::dom::DOMRect>>()
, 8usize);
}
#[test]
- fn __bindgen_test_layout_template_33() {
+ fn __bindgen_test_layout_template_40() {
assert_eq!(::std::mem::size_of::<root::mozilla::DefaultDelete<root::ProxyBehaviour>>()
, 1usize);
assert_eq!(::std::mem::align_of::<root::mozilla::DefaultDelete<root::ProxyBehaviour>>()
, 1usize);
}
#[test]
- fn __bindgen_test_layout_template_34() {
+ fn __bindgen_test_layout_template_41() {
assert_eq!(::std::mem::size_of::<root::mozilla::DefaultDelete<root::nsCSSValueList>>()
, 1usize);
assert_eq!(::std::mem::align_of::<root::mozilla::DefaultDelete<root::nsCSSValueList>>()
, 1usize);
}
#[test]
- fn __bindgen_test_layout_template_35() {
+ fn __bindgen_test_layout_template_42() {
assert_eq!(::std::mem::size_of::<root::mozilla::DefaultDelete<root::nsCSSValuePairList>>()
, 1usize);
assert_eq!(::std::mem::align_of::<root::mozilla::DefaultDelete<root::nsCSSValuePairList>>()
, 1usize);
}
#[test]
- fn __bindgen_test_layout_template_36() {
+ fn __bindgen_test_layout_template_43() {
+ assert_eq!(::std::mem::size_of::<u64>() , 8usize);
+ assert_eq!(::std::mem::align_of::<u64>() , 8usize);
+ }
+ #[test]
+ fn __bindgen_test_layout_template_44() {
+ assert_eq!(::std::mem::size_of::<[u64; 2usize]>() , 16usize);
+ assert_eq!(::std::mem::align_of::<[u64; 2usize]>() , 8usize);
+ }
+ #[test]
+ fn __bindgen_test_layout_template_45() {
assert_eq!(::std::mem::size_of::<root::mozilla::DefaultDelete<root::nsStyleSides>>()
, 1usize);
assert_eq!(::std::mem::align_of::<root::mozilla::DefaultDelete<root::nsStyleSides>>()
, 1usize);
}
#[test]
- fn __bindgen_test_layout_template_37() {
+ fn __bindgen_test_layout_template_46() {
assert_eq!(::std::mem::size_of::<root::mozilla::DefaultDelete<root::CachedBorderImageData>>()
, 1usize);
assert_eq!(::std::mem::align_of::<root::mozilla::DefaultDelete<root::CachedBorderImageData>>()
, 1usize);
}
#[test]
- fn __bindgen_test_layout_template_38() {
+ fn __bindgen_test_layout_template_47() {
assert_eq!(::std::mem::size_of::<root::std::pair<::nsstring::nsStringRepr, ::nsstring::nsStringRepr>>()
, 32usize);
assert_eq!(::std::mem::align_of::<root::std::pair<::nsstring::nsStringRepr, ::nsstring::nsStringRepr>>()
, 8usize);
}
#[test]
- fn __bindgen_test_layout_template_39() {
+ fn __bindgen_test_layout_template_48() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::css::DocumentRule>>()
, 8usize);
assert_eq!(::std::mem::align_of::<root::nsTArray<*mut root::mozilla::css::DocumentRule>>()
diff --git a/components/style/gecko_bindings/structs_release.rs b/components/style/gecko_bindings/structs_release.rs
index 89bef397c47..1c2bc868a04 100644
--- a/components/style/gecko_bindings/structs_release.rs
+++ b/components/style/gecko_bindings/structs_release.rs
@@ -994,7 +994,6 @@ pub mod root {
pub const NS_STYLE_DISPLAY_MODE_BROWSER: ::std::os::raw::c_uint = 0;
pub const NS_STYLE_DISPLAY_MODE_MINIMAL_UI: ::std::os::raw::c_uint = 1;
pub const NS_STYLE_DISPLAY_MODE_STANDALONE: ::std::os::raw::c_uint = 2;
- pub const NS_STYLE_DISPLAY_MODE_FULLSCREEN: ::std::os::raw::c_uint = 3;
pub const NS_STYLE_INHERIT_MASK: ::std::os::raw::c_uint = 16777215;
pub const NS_STYLE_HAS_TEXT_DECORATION_LINES: ::std::os::raw::c_uint =
16777216;
@@ -1454,7 +1453,6 @@ pub mod root {
* conceptual!
*/
#[repr(C)]
- #[derive(Debug, Copy, Clone)]
pub struct Pair<A, B> {
pub _address: u8,
pub _phantom_0: ::std::marker::PhantomData<A>,
@@ -1626,6 +1624,10 @@ pub mod root {
pub mod dom {
#[allow(unused_imports)]
use self::super::super::super::root;
+ pub mod binding_detail {
+ #[allow(unused_imports)]
+ use self::super::super::super::super::root;
+ }
#[repr(C)]
#[derive(Debug, Copy)]
pub struct AllOwningUnionBase {
@@ -1835,6 +1837,18 @@ pub mod root {
eRethrowExceptions = 2,
}
#[repr(C)]
+ #[derive(Debug)]
+ pub struct CallbackObject_JSObjectsDropper {
+ pub mHolder: root::RefPtr<root::mozilla::dom::CallbackObject>,
+ }
+ #[test]
+ fn bindgen_test_layout_CallbackObject_JSObjectsDropper() {
+ assert_eq!(::std::mem::size_of::<CallbackObject_JSObjectsDropper>()
+ , 8usize);
+ assert_eq!(::std::mem::align_of::<CallbackObject_JSObjectsDropper>()
+ , 8usize);
+ }
+ #[repr(C)]
#[derive(Debug, Copy)]
pub struct CallbackObject_FastCallbackConstructor {
pub _address: u8,
@@ -1860,7 +1874,7 @@ pub mod root {
pub mAsyncStack: [u64; 4usize],
pub mAsyncStackSetter: [u64; 7usize],
pub mAc: [u64; 3usize],
- pub mErrorResult: *mut [u64; 2usize],
+ pub mErrorResult: *mut root::mozilla::ErrorResult,
pub mExceptionHandling: root::mozilla::dom::CallbackObject_ExceptionHandling,
pub mIsMainThread: bool,
}
@@ -2452,6 +2466,116 @@ pub mod root {
}
#[repr(C)]
#[derive(Debug, Copy)]
+ pub struct ErrorResult {
+ pub _bindgen_opaque_blob: [u64; 2usize],
+ }
+ pub type ErrorResult_BaseErrorResult =
+ root::mozilla::binding_danger::TErrorResult<root::mozilla::binding_danger::AssertAndSuppressCleanupPolicy>;
+ #[test]
+ fn bindgen_test_layout_ErrorResult() {
+ assert_eq!(::std::mem::size_of::<ErrorResult>() , 16usize);
+ assert_eq!(::std::mem::align_of::<ErrorResult>() , 8usize);
+ }
+ impl Clone for ErrorResult {
+ fn clone(&self) -> Self { *self }
+ }
+ pub mod binding_danger {
+ #[allow(unused_imports)]
+ use self::super::super::super::root;
+ /**
+ * Templated implementation class for various ErrorResult-like things. The
+ * instantiations differ only in terms of their cleanup policies (used in the
+ * destructor), which they can specify via the template argument. Note that
+ * this means it's safe to reinterpret_cast between the instantiations unless
+ * you plan to invoke the destructor through such a cast pointer.
+ *
+ * A cleanup policy consists of two booleans: whether to assert that we've been
+ * reported or suppressed, and whether to then go ahead and suppress the
+ * exception.
+ */
+ #[repr(C)]
+ #[derive(Debug)]
+ pub struct TErrorResult<CleanupPolicy> {
+ pub mResult: root::nsresult,
+ pub __bindgen_anon_1: root::mozilla::binding_danger::TErrorResult__bindgen_ty_1<CleanupPolicy>,
+ pub _phantom_0: ::std::marker::PhantomData<CleanupPolicy>,
+ }
+ #[repr(C)]
+ #[derive(Debug, Copy, Clone)]
+ pub struct TErrorResult_Message<CleanupPolicy> {
+ pub _address: u8,
+ pub _phantom_0: ::std::marker::PhantomData<CleanupPolicy>,
+ }
+ #[repr(C)]
+ #[derive(Debug, Copy, Clone)]
+ pub struct TErrorResult_DOMExceptionInfo<CleanupPolicy> {
+ pub _address: u8,
+ pub _phantom_0: ::std::marker::PhantomData<CleanupPolicy>,
+ }
+ #[repr(C)]
+ #[derive(Debug, Copy, Clone)]
+ pub struct TErrorResult__bindgen_ty_1<CleanupPolicy> {
+ pub mMessage: root::__BindgenUnionField<*mut root::mozilla::binding_danger::TErrorResult_Message<CleanupPolicy>>,
+ pub mJSException: root::__BindgenUnionField<root::JS::Value>,
+ pub mDOMExceptionInfo: root::__BindgenUnionField<*mut root::mozilla::binding_danger::TErrorResult_DOMExceptionInfo<CleanupPolicy>>,
+ pub bindgen_union_field: u64,
+ pub _phantom_0: ::std::marker::PhantomData<CleanupPolicy>,
+ }
+ #[repr(C)]
+ #[derive(Debug, Copy)]
+ pub struct JustAssertCleanupPolicy {
+ pub _address: u8,
+ }
+ pub const JustAssertCleanupPolicy_assertHandled: bool = true;
+ pub const JustAssertCleanupPolicy_suppress: bool = false;
+ #[test]
+ fn bindgen_test_layout_JustAssertCleanupPolicy() {
+ assert_eq!(::std::mem::size_of::<JustAssertCleanupPolicy>() ,
+ 1usize);
+ assert_eq!(::std::mem::align_of::<JustAssertCleanupPolicy>() ,
+ 1usize);
+ }
+ impl Clone for JustAssertCleanupPolicy {
+ fn clone(&self) -> Self { *self }
+ }
+ #[repr(C)]
+ #[derive(Debug, Copy)]
+ pub struct AssertAndSuppressCleanupPolicy {
+ pub _address: u8,
+ }
+ pub const AssertAndSuppressCleanupPolicy_assertHandled: bool =
+ true;
+ pub const AssertAndSuppressCleanupPolicy_suppress: bool = true;
+ #[test]
+ fn bindgen_test_layout_AssertAndSuppressCleanupPolicy() {
+ assert_eq!(::std::mem::size_of::<AssertAndSuppressCleanupPolicy>()
+ , 1usize);
+ assert_eq!(::std::mem::align_of::<AssertAndSuppressCleanupPolicy>()
+ , 1usize);
+ }
+ impl Clone for AssertAndSuppressCleanupPolicy {
+ fn clone(&self) -> Self { *self }
+ }
+ #[repr(C)]
+ #[derive(Debug, Copy)]
+ pub struct JustSuppressCleanupPolicy {
+ pub _address: u8,
+ }
+ pub const JustSuppressCleanupPolicy_assertHandled: bool = false;
+ pub const JustSuppressCleanupPolicy_suppress: bool = true;
+ #[test]
+ fn bindgen_test_layout_JustSuppressCleanupPolicy() {
+ assert_eq!(::std::mem::size_of::<JustSuppressCleanupPolicy>()
+ , 1usize);
+ assert_eq!(::std::mem::align_of::<JustSuppressCleanupPolicy>()
+ , 1usize);
+ }
+ impl Clone for JustSuppressCleanupPolicy {
+ fn clone(&self) -> Self { *self }
+ }
+ }
+ #[repr(C)]
+ #[derive(Debug, Copy)]
pub struct ShortcutKeyCandidate {
pub _address: u8,
}
@@ -2681,6 +2805,7 @@ pub mod root {
pub mParsingMode: root::mozilla::css::SheetParsingMode,
pub mType: root::StyleBackendType,
pub mDisabled: bool,
+ pub mDocumentAssociationMode: root::mozilla::StyleSheet_DocumentAssociationMode,
}
pub type StyleSheet_HasThreadSafeRefCnt = root::mozilla::FalseType;
#[repr(C)]
@@ -2698,6 +2823,12 @@ pub mod root {
impl Clone for StyleSheet_cycleCollection {
fn clone(&self) -> Self { *self }
}
+ #[repr(u32)]
+ #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
+ pub enum StyleSheet_DocumentAssociationMode {
+ OwnedByDocument = 0,
+ NotOwnedByDocument = 1,
+ }
extern "C" {
#[link_name = "_ZN7mozilla10StyleSheet21_cycleCollectorGlobalE"]
pub static mut StyleSheet__cycleCollectorGlobal:
@@ -2705,7 +2836,7 @@ pub mod root {
}
#[test]
fn bindgen_test_layout_StyleSheet() {
- assert_eq!(::std::mem::size_of::<StyleSheet>() , 88usize);
+ assert_eq!(::std::mem::size_of::<StyleSheet>() , 96usize);
assert_eq!(::std::mem::align_of::<StyleSheet>() , 8usize);
}
#[repr(C)]
@@ -3132,7 +3263,7 @@ pub mod root {
}
#[repr(u8)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
- pub enum StyleShapeRadius { FarthestSide = 0, ClosestSide = 1, }
+ pub enum StyleShapeRadius { ClosestSide = 0, FarthestSide = 1, }
#[repr(u8)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum StyleShapeSourceType {
@@ -3417,7 +3548,7 @@ pub mod root {
#[derive(Debug)]
pub struct PropertyStyleAnimationValuePair {
pub mProperty: root::nsCSSPropertyID,
- pub mValue: [u64; 2usize],
+ pub mValue: root::mozilla::StyleAnimationValue,
pub mServoValue: root::RefPtr<root::RawServoAnimationValue>,
}
#[test]
@@ -3709,6 +3840,112 @@ pub mod root {
root::mozilla::StyleShapeSource<root::mozilla::StyleGeometryBox>;
pub type StyleShapeOutside =
root::mozilla::StyleShapeSource<root::mozilla::StyleShapeOutsideShapeBox>;
+ /**
+ * Utility class to handle animated style values
+ */
+ #[repr(C)]
+ #[derive(Debug, Copy)]
+ pub struct StyleAnimationValue {
+ pub _bindgen_opaque_blob: [u64; 2usize],
+ }
+ #[repr(u32)]
+ /**
+ * The types and values for the values that we extract and animate.
+ */
+ #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
+ pub enum StyleAnimationValue_Unit {
+ eUnit_Null = 0,
+ eUnit_Normal = 1,
+ eUnit_Auto = 2,
+ eUnit_None = 3,
+ eUnit_Enumerated = 4,
+ eUnit_Visibility = 5,
+ eUnit_Integer = 6,
+ eUnit_Coord = 7,
+ eUnit_Percent = 8,
+ eUnit_Float = 9,
+ eUnit_Color = 10,
+ eUnit_CurrentColor = 11,
+ eUnit_ComplexColor = 12,
+ eUnit_Calc = 13,
+ eUnit_ObjectPosition = 14,
+ eUnit_URL = 15,
+ eUnit_DiscreteCSSValue = 16,
+ eUnit_CSSValuePair = 17,
+ eUnit_CSSValueTriplet = 18,
+ eUnit_CSSRect = 19,
+ eUnit_Dasharray = 20,
+ eUnit_Shadow = 21,
+ eUnit_Shape = 22,
+ eUnit_Filter = 23,
+ eUnit_Transform = 24,
+ eUnit_BackgroundPositionCoord = 25,
+ eUnit_CSSValuePairList = 26,
+ eUnit_UnparsedString = 27,
+ }
+ #[repr(C)]
+ #[derive(Debug, Copy)]
+ pub struct StyleAnimationValue__bindgen_ty_1 {
+ pub mInt: root::__BindgenUnionField<i32>,
+ pub mCoord: root::__BindgenUnionField<root::nscoord>,
+ pub mFloat: root::__BindgenUnionField<f32>,
+ pub mCSSValue: root::__BindgenUnionField<*mut root::nsCSSValue>,
+ pub mCSSValuePair: root::__BindgenUnionField<*mut root::nsCSSValuePair>,
+ pub mCSSValueTriplet: root::__BindgenUnionField<*mut root::nsCSSValueTriplet>,
+ pub mCSSRect: root::__BindgenUnionField<*mut root::nsCSSRect>,
+ pub mCSSValueArray: root::__BindgenUnionField<*mut root::nsCSSValue_Array>,
+ pub mCSSValueList: root::__BindgenUnionField<*mut root::nsCSSValueList>,
+ pub mCSSValueSharedList: root::__BindgenUnionField<*mut root::nsCSSValueSharedList>,
+ pub mCSSValuePairList: root::__BindgenUnionField<*mut root::nsCSSValuePairList>,
+ pub mString: root::__BindgenUnionField<*mut root::nsStringBuffer>,
+ pub mComplexColor: root::__BindgenUnionField<*mut root::mozilla::css::ComplexColorValue>,
+ pub bindgen_union_field: u64,
+ }
+ #[test]
+ fn bindgen_test_layout_StyleAnimationValue__bindgen_ty_1() {
+ assert_eq!(::std::mem::size_of::<StyleAnimationValue__bindgen_ty_1>()
+ , 8usize);
+ assert_eq!(::std::mem::align_of::<StyleAnimationValue__bindgen_ty_1>()
+ , 8usize);
+ }
+ impl Clone for StyleAnimationValue__bindgen_ty_1 {
+ fn clone(&self) -> Self { *self }
+ }
+ #[repr(u32)]
+ #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
+ pub enum StyleAnimationValue_IntegerConstructorType {
+ IntegerConstructor = 0,
+ }
+ #[repr(u32)]
+ #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
+ pub enum StyleAnimationValue_CoordConstructorType {
+ CoordConstructor = 0,
+ }
+ #[repr(u32)]
+ #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
+ pub enum StyleAnimationValue_PercentConstructorType {
+ PercentConstructor = 0,
+ }
+ #[repr(u32)]
+ #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
+ pub enum StyleAnimationValue_FloatConstructorType {
+ FloatConstructor = 0,
+ }
+ #[repr(u32)]
+ #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
+ pub enum StyleAnimationValue_ColorConstructorType {
+ ColorConstructor = 0,
+ }
+ #[test]
+ fn bindgen_test_layout_StyleAnimationValue() {
+ assert_eq!(::std::mem::size_of::<StyleAnimationValue>() ,
+ 16usize);
+ assert_eq!(::std::mem::align_of::<StyleAnimationValue>() ,
+ 8usize);
+ }
+ impl Clone for StyleAnimationValue {
+ fn clone(&self) -> Self { *self }
+ }
#[test]
fn __bindgen_test_layout_template_2() {
assert_eq!(::std::mem::size_of::<root::mozilla::StyleShapeSource<root::mozilla::StyleGeometryBox>>()
@@ -3747,20 +3984,52 @@ pub mod root {
}
pub type pair_first_type<_T1> = _T1;
pub type pair_second_type<_T2> = _T2;
- pub type pair__PCCP = [u8; 0usize];
#[repr(C)]
- #[derive(Debug)]
pub struct atomic<_Tp> {
- pub _M_i: _Tp,
+ pub _base: (),
+ pub _phantom_0: ::std::marker::PhantomData<_Tp>,
}
- pub mod namespace {
- #[allow(unused_imports)]
- use self::super::super::super::root;
+ pub type atomic___base = [u8; 0usize];
+ #[repr(C)]
+ #[derive(Debug, Copy)]
+ pub struct input_iterator_tag {
+ pub _address: u8,
}
- }
- pub mod __gnu_cxx {
- #[allow(unused_imports)]
- use self::super::super::root;
+ impl Clone for input_iterator_tag {
+ fn clone(&self) -> Self { *self }
+ }
+ #[repr(C)]
+ #[derive(Debug, Copy)]
+ pub struct forward_iterator_tag {
+ pub _address: u8,
+ }
+ impl Clone for forward_iterator_tag {
+ fn clone(&self) -> Self { *self }
+ }
+ #[repr(C)]
+ #[derive(Debug, Copy)]
+ pub struct bidirectional_iterator_tag {
+ pub _address: u8,
+ }
+ impl Clone for bidirectional_iterator_tag {
+ fn clone(&self) -> Self { *self }
+ }
+ #[repr(C)]
+ #[derive(Debug, Copy)]
+ pub struct random_access_iterator_tag {
+ pub _address: u8,
+ }
+ impl Clone for random_access_iterator_tag {
+ fn clone(&self) -> Self { *self }
+ }
+ #[repr(C)]
+ #[derive(Debug, Copy, Clone)]
+ pub struct __bit_const_reference<_Cp> {
+ pub __seg_: root::std::__bit_const_reference___storage_pointer<_Cp>,
+ pub __mask_: root::std::__bit_const_reference___storage_type<_Cp>,
+ }
+ pub type __bit_const_reference___storage_type<_Cp> = _Cp;
+ pub type __bit_const_reference___storage_pointer<_Cp> = _Cp;
}
/**
* MozRefCountType is Mozilla's reference count type.
@@ -4316,6 +4585,146 @@ pub mod root {
pub mod JS {
#[allow(unused_imports)]
use self::super::super::root;
+ /**
+ * JS::Value is the interface for a single JavaScript Engine value. A few
+ * general notes on JS::Value:
+ *
+ * - JS::Value has setX() and isX() members for X in
+ *
+ * { Int32, Double, String, Symbol, Boolean, Undefined, Null, Object, Magic }
+ *
+ * JS::Value also contains toX() for each of the non-singleton types.
+ *
+ * - Magic is a singleton type whose payload contains either a JSWhyMagic "reason" for
+ * the magic value or a uint32_t value. By providing JSWhyMagic values when
+ * creating and checking for magic values, it is possible to assert, at
+ * runtime, that only magic values with the expected reason flow through a
+ * particular value. For example, if cx->exception has a magic value, the
+ * reason must be JS_GENERATOR_CLOSING.
+ *
+ * - The JS::Value operations are preferred. The JSVAL_* operations remain for
+ * compatibility; they may be removed at some point. These operations mostly
+ * provide similar functionality. But there are a few key differences. One
+ * is that JS::Value gives null a separate type.
+ * Also, to help prevent mistakenly boxing a nullable JSObject* as an object,
+ * Value::setObject takes a JSObject&. (Conversely, Value::toObject returns a
+ * JSObject&.) A convenience member Value::setObjectOrNull is provided.
+ *
+ * - JSVAL_VOID is the same as the singleton value of the Undefined type.
+ *
+ * - Note that JS::Value is 8 bytes on 32 and 64-bit architectures. Thus, on
+ * 32-bit user code should avoid copying jsval/JS::Value as much as possible,
+ * preferring to pass by const Value&.
+ */
+ #[repr(C)]
+ #[derive(Debug, Copy)]
+ pub struct Value {
+ pub data: root::JS::Value_layout,
+ }
+ pub type Value_PayloadType = u64;
+ #[repr(C)]
+ #[derive(Debug, Copy)]
+ pub struct Value_layout {
+ pub asBits: root::__BindgenUnionField<u64>,
+ pub debugView: root::__BindgenUnionField<root::JS::Value_layout__bindgen_ty_1>,
+ pub s: root::__BindgenUnionField<root::JS::Value_layout__bindgen_ty_2>,
+ pub asDouble: root::__BindgenUnionField<f64>,
+ pub asPtr: root::__BindgenUnionField<*mut ::std::os::raw::c_void>,
+ pub asWord: root::__BindgenUnionField<usize>,
+ pub asUIntPtr: root::__BindgenUnionField<usize>,
+ pub bindgen_union_field: u64,
+ }
+ #[repr(C)]
+ #[derive(Debug, Copy)]
+ pub struct Value_layout__bindgen_ty_1 {
+ pub _bitfield_1: u64,
+ }
+ #[test]
+ fn bindgen_test_layout_Value_layout__bindgen_ty_1() {
+ assert_eq!(::std::mem::size_of::<Value_layout__bindgen_ty_1>() ,
+ 8usize);
+ assert_eq!(::std::mem::align_of::<Value_layout__bindgen_ty_1>() ,
+ 8usize);
+ }
+ impl Clone for Value_layout__bindgen_ty_1 {
+ fn clone(&self) -> Self { *self }
+ }
+ impl Value_layout__bindgen_ty_1 {
+ #[inline]
+ pub fn payload47(&self) -> u64 {
+ unsafe {
+ ::std::mem::transmute(((self._bitfield_1 &
+ (140737488355327usize as u64))
+ >> 0u32) as u64)
+ }
+ }
+ #[inline]
+ pub fn set_payload47(&mut self, val: u64) {
+ self._bitfield_1 &= !(140737488355327usize as u64);
+ self._bitfield_1 |=
+ ((val as u64 as u64) << 0u32) &
+ (140737488355327usize as u64);
+ }
+ #[inline]
+ pub fn tag(&self) -> root::JSValueTag {
+ unsafe {
+ ::std::mem::transmute(((self._bitfield_1 &
+ (18446603336221196288usize as
+ u64)) >> 47u32) as u32)
+ }
+ }
+ #[inline]
+ pub fn set_tag(&mut self, val: root::JSValueTag) {
+ self._bitfield_1 &= !(18446603336221196288usize as u64);
+ self._bitfield_1 |=
+ ((val as u32 as u64) << 47u32) &
+ (18446603336221196288usize as u64);
+ }
+ }
+ #[repr(C)]
+ #[derive(Debug, Copy)]
+ pub struct Value_layout__bindgen_ty_2 {
+ pub payload: root::JS::Value_layout__bindgen_ty_2__bindgen_ty_1,
+ }
+ #[repr(C)]
+ #[derive(Debug, Copy)]
+ pub struct Value_layout__bindgen_ty_2__bindgen_ty_1 {
+ pub i32: root::__BindgenUnionField<i32>,
+ pub u32: root::__BindgenUnionField<u32>,
+ pub why: root::__BindgenUnionField<root::JSWhyMagic>,
+ pub bindgen_union_field: u32,
+ }
+ #[test]
+ fn bindgen_test_layout_Value_layout__bindgen_ty_2__bindgen_ty_1() {
+ assert_eq!(::std::mem::size_of::<Value_layout__bindgen_ty_2__bindgen_ty_1>()
+ , 4usize);
+ assert_eq!(::std::mem::align_of::<Value_layout__bindgen_ty_2__bindgen_ty_1>()
+ , 4usize);
+ }
+ impl Clone for Value_layout__bindgen_ty_2__bindgen_ty_1 {
+ fn clone(&self) -> Self { *self }
+ }
+ #[test]
+ fn bindgen_test_layout_Value_layout__bindgen_ty_2() {
+ assert_eq!(::std::mem::size_of::<Value_layout__bindgen_ty_2>() ,
+ 4usize);
+ assert_eq!(::std::mem::align_of::<Value_layout__bindgen_ty_2>() ,
+ 4usize);
+ }
+ impl Clone for Value_layout__bindgen_ty_2 {
+ fn clone(&self) -> Self { *self }
+ }
+ #[test]
+ fn bindgen_test_layout_Value_layout() {
+ assert_eq!(::std::mem::size_of::<Value_layout>() , 8usize);
+ assert_eq!(::std::mem::align_of::<Value_layout>() , 8usize);
+ }
+ impl Clone for Value_layout {
+ fn clone(&self) -> Self { *self }
+ }
+ impl Clone for Value {
+ fn clone(&self) -> Self { *self }
+ }
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct DeletePolicy<T> {
@@ -4443,6 +4852,11 @@ pub mod root {
pub enum TenuredHeap__bindgen_ty_1 { maskBits = 0, }
#[test]
fn __bindgen_test_layout_template_4() {
+ assert_eq!(::std::mem::size_of::<[u64; 3usize]>() , 24usize);
+ assert_eq!(::std::mem::align_of::<[u64; 3usize]>() , 8usize);
+ }
+ #[test]
+ fn __bindgen_test_layout_template_5() {
assert_eq!(::std::mem::size_of::<root::mozilla::UniquePtr<*mut ::std::os::raw::c_char,
root::JS::FreePolicy>>()
, 8usize);
@@ -4520,6 +4934,42 @@ pub mod root {
impl Clone for JSCompartment {
fn clone(&self) -> Self { *self }
}
+ #[repr(u32)]
+ #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
+ pub enum JSValueTag {
+ JSVAL_TAG_MAX_DOUBLE = 131056,
+ JSVAL_TAG_INT32 = 131057,
+ JSVAL_TAG_UNDEFINED = 131058,
+ JSVAL_TAG_NULL = 131059,
+ JSVAL_TAG_BOOLEAN = 131060,
+ JSVAL_TAG_MAGIC = 131061,
+ JSVAL_TAG_STRING = 131062,
+ JSVAL_TAG_SYMBOL = 131063,
+ JSVAL_TAG_PRIVATE_GCTHING = 131064,
+ JSVAL_TAG_OBJECT = 131068,
+ }
+ #[repr(u32)]
+ #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
+ pub enum JSWhyMagic {
+ JS_ELEMENTS_HOLE = 0,
+ JS_NO_ITER_VALUE = 1,
+ JS_GENERATOR_CLOSING = 2,
+ JS_NO_CONSTANT = 3,
+ JS_THIS_POISON = 4,
+ JS_ARG_POISON = 5,
+ JS_SERIALIZE_NO_NODE = 6,
+ JS_LAZY_ARGUMENTS = 7,
+ JS_OPTIMIZED_ARGUMENTS = 8,
+ JS_IS_CONSTRUCTING = 9,
+ JS_BLOCK_NEEDS_CLONE = 10,
+ JS_HASH_KEY_EMPTY = 11,
+ JS_ION_ERROR = 12,
+ JS_ION_BAILOUT = 13,
+ JS_OPTIMIZED_OUT = 14,
+ JS_UNINITIALIZED_LEXICAL = 15,
+ JS_GENERIC_MAGIC = 16,
+ JS_WHY_MAGIC_COUNT = 17,
+ }
#[repr(C)]
#[derive(Debug)]
pub struct nsAString_internal {
@@ -4839,13 +5289,13 @@ pub mod root {
pub _phantom_0: ::std::marker::PhantomData<CharT>,
}
#[test]
- fn __bindgen_test_layout_template_5() {
+ fn __bindgen_test_layout_template_6() {
assert_eq!(::std::mem::size_of::<root::nsCharTraits<u16>>() , 1usize);
assert_eq!(::std::mem::align_of::<root::nsCharTraits<u16>>() ,
1usize);
}
#[test]
- fn __bindgen_test_layout_template_6() {
+ fn __bindgen_test_layout_template_7() {
assert_eq!(::std::mem::size_of::<root::nsCharTraits<::std::os::raw::c_char>>()
, 1usize);
assert_eq!(::std::mem::align_of::<root::nsCharTraits<::std::os::raw::c_char>>()
@@ -5059,7 +5509,7 @@ pub mod root {
pub mRawPtr: *mut root::nsISupports,
}
#[test]
- fn __bindgen_test_layout_template_7() {
+ fn __bindgen_test_layout_template_8() {
assert_eq!(::std::mem::size_of::<root::nsCOMPtr<root::nsISupports>>()
, 8usize);
assert_eq!(::std::mem::align_of::<root::nsCOMPtr<root::nsISupports>>()
@@ -5564,7 +6014,7 @@ pub mod root {
pub _base_1: root::mozilla::dom::DispatcherTrait,
pub mDeprecationWarnedAbout: u64,
pub mDocWarningWarnedAbout: u64,
- pub mSelectorCache: [u64; 15usize],
+ pub mSelectorCache: root::nsIDocument_SelectorCache,
pub mReferrer: root::nsCString,
pub mLastModified: ::nsstring::nsStringRepr,
pub mDocumentURI: root::nsCOMPtr<root::nsIURI>,
@@ -5721,7 +6171,7 @@ pub mod root {
fn clone(&self) -> Self { *self }
}
#[repr(C)]
- #[derive(Debug)]
+ #[derive(Debug, Copy)]
pub struct nsIDocument_SelectorCache {
pub _bindgen_opaque_blob: [u64; 15usize],
}
@@ -5732,6 +6182,9 @@ pub mod root {
assert_eq!(::std::mem::align_of::<nsIDocument_SelectorCache>() ,
8usize);
}
+ impl Clone for nsIDocument_SelectorCache {
+ fn clone(&self) -> Self { *self }
+ }
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum nsIDocument_additionalSheetType {
@@ -6989,6 +7442,20 @@ pub mod root {
eCompatibility_AlmostStandards = 2,
eCompatibility_NavQuirks = 3,
}
+ #[repr(C)]
+ #[derive(Debug, Copy)]
+ pub struct gfxSize {
+ pub _bindgen_opaque_blob: [u64; 2usize],
+ }
+ pub type gfxSize_Super = [u64; 2usize];
+ #[test]
+ fn bindgen_test_layout_gfxSize() {
+ assert_eq!(::std::mem::size_of::<gfxSize>() , 16usize);
+ assert_eq!(::std::mem::align_of::<gfxSize>() , 8usize);
+ }
+ impl Clone for gfxSize {
+ fn clone(&self) -> Self { *self }
+ }
pub type nscolor = u32;
#[repr(C)]
#[derive(Debug)]
@@ -7017,7 +7484,7 @@ pub mod root {
pub mTextZoom: f32,
pub mFullZoom: f32,
pub mOverrideDPPX: f32,
- pub mLastFontInflationScreenSize: [u64; 2usize],
+ pub mLastFontInflationScreenSize: root::gfxSize,
pub mCurAppUnitsPerDevPixel: i32,
pub mAutoQualityMinFontSizePixelsPref: i32,
pub mTheme: root::nsCOMPtr<root::nsITheme>,
@@ -8253,7 +8720,7 @@ pub mod root {
root::mozilla::dom::OwningNodeOrString;
pub type nsINode_TextOrElementOrDocument =
root::mozilla::dom::TextOrElementOrDocument;
- pub type nsINode_ErrorResult = [u64; 2usize];
+ pub type nsINode_ErrorResult = root::mozilla::ErrorResult;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct nsINode_COMTypeInfo<T, U> {
@@ -8463,7 +8930,7 @@ pub mod root {
pub mArray: root::nsTArray<root::nsAutoPtr<root::nsMediaQuery>>,
pub mStyleSheet: *mut root::mozilla::StyleSheet,
}
- pub type nsMediaList_ErrorResult = [u64; 2usize];
+ pub type nsMediaList_ErrorResult = root::mozilla::ErrorResult;
pub type nsMediaList_HasThreadSafeRefCnt = root::mozilla::FalseType;
#[repr(C)]
#[derive(Debug, Copy)]
@@ -8713,7 +9180,7 @@ pub mod root {
}
pub type nsDOMAttributeMap_Attr = root::mozilla::dom::Attr;
pub type nsDOMAttributeMap_Element = root::mozilla::dom::Element;
- pub type nsDOMAttributeMap_ErrorResult = [u64; 2usize];
+ pub type nsDOMAttributeMap_ErrorResult = root::mozilla::ErrorResult;
pub type nsDOMAttributeMap_HasThreadSafeRefCnt = root::mozilla::FalseType;
#[repr(C)]
#[derive(Debug, Copy)]
@@ -9253,63 +9720,63 @@ pub mod root {
impl Clone for nsDOMMutationObserver {
fn clone(&self) -> Self { *self }
}
- pub const NODE_HAS_LISTENERMANAGER: root::_bindgen_ty_118 =
- _bindgen_ty_118::NODE_HAS_LISTENERMANAGER;
- pub const NODE_HAS_PROPERTIES: root::_bindgen_ty_118 =
- _bindgen_ty_118::NODE_HAS_PROPERTIES;
- pub const NODE_IS_ANONYMOUS_ROOT: root::_bindgen_ty_118 =
- _bindgen_ty_118::NODE_IS_ANONYMOUS_ROOT;
- pub const NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE: root::_bindgen_ty_118 =
- _bindgen_ty_118::NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE;
- pub const NODE_IS_NATIVE_ANONYMOUS_ROOT: root::_bindgen_ty_118 =
- _bindgen_ty_118::NODE_IS_NATIVE_ANONYMOUS_ROOT;
- pub const NODE_FORCE_XBL_BINDINGS: root::_bindgen_ty_118 =
- _bindgen_ty_118::NODE_FORCE_XBL_BINDINGS;
- pub const NODE_MAY_BE_IN_BINDING_MNGR: root::_bindgen_ty_118 =
- _bindgen_ty_118::NODE_MAY_BE_IN_BINDING_MNGR;
- pub const NODE_IS_EDITABLE: root::_bindgen_ty_118 =
- _bindgen_ty_118::NODE_IS_EDITABLE;
- pub const NODE_MAY_HAVE_CLASS: root::_bindgen_ty_118 =
- _bindgen_ty_118::NODE_MAY_HAVE_CLASS;
- pub const NODE_IS_IN_SHADOW_TREE: root::_bindgen_ty_118 =
- _bindgen_ty_118::NODE_IS_IN_SHADOW_TREE;
- pub const NODE_HAS_EMPTY_SELECTOR: root::_bindgen_ty_118 =
- _bindgen_ty_118::NODE_HAS_EMPTY_SELECTOR;
- pub const NODE_HAS_SLOW_SELECTOR: root::_bindgen_ty_118 =
- _bindgen_ty_118::NODE_HAS_SLOW_SELECTOR;
- pub const NODE_HAS_EDGE_CHILD_SELECTOR: root::_bindgen_ty_118 =
- _bindgen_ty_118::NODE_HAS_EDGE_CHILD_SELECTOR;
- pub const NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS: root::_bindgen_ty_118 =
- _bindgen_ty_118::NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS;
- pub const NODE_ALL_SELECTOR_FLAGS: root::_bindgen_ty_118 =
- _bindgen_ty_118::NODE_ALL_SELECTOR_FLAGS;
- pub const NODE_NEEDS_FRAME: root::_bindgen_ty_118 =
- _bindgen_ty_118::NODE_NEEDS_FRAME;
- pub const NODE_DESCENDANTS_NEED_FRAMES: root::_bindgen_ty_118 =
- _bindgen_ty_118::NODE_DESCENDANTS_NEED_FRAMES;
- pub const NODE_HAS_ACCESSKEY: root::_bindgen_ty_118 =
- _bindgen_ty_118::NODE_HAS_ACCESSKEY;
- pub const NODE_HAS_DIRECTION_RTL: root::_bindgen_ty_118 =
- _bindgen_ty_118::NODE_HAS_DIRECTION_RTL;
- pub const NODE_HAS_DIRECTION_LTR: root::_bindgen_ty_118 =
- _bindgen_ty_118::NODE_HAS_DIRECTION_LTR;
- pub const NODE_ALL_DIRECTION_FLAGS: root::_bindgen_ty_118 =
- _bindgen_ty_118::NODE_ALL_DIRECTION_FLAGS;
- pub const NODE_CHROME_ONLY_ACCESS: root::_bindgen_ty_118 =
- _bindgen_ty_118::NODE_CHROME_ONLY_ACCESS;
- pub const NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS: root::_bindgen_ty_118 =
- _bindgen_ty_118::NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS;
- pub const NODE_SHARED_RESTYLE_BIT_1: root::_bindgen_ty_118 =
- _bindgen_ty_118::NODE_SHARED_RESTYLE_BIT_1;
- pub const NODE_SHARED_RESTYLE_BIT_2: root::_bindgen_ty_118 =
- _bindgen_ty_118::NODE_SHARED_RESTYLE_BIT_2;
- pub const NODE_HAS_DIRTY_DESCENDANTS_FOR_SERVO: root::_bindgen_ty_118 =
- _bindgen_ty_118::NODE_SHARED_RESTYLE_BIT_1;
- pub const NODE_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_118 =
- _bindgen_ty_118::NODE_TYPE_SPECIFIC_BITS_OFFSET;
+ pub const NODE_HAS_LISTENERMANAGER: root::_bindgen_ty_34 =
+ _bindgen_ty_34::NODE_HAS_LISTENERMANAGER;
+ pub const NODE_HAS_PROPERTIES: root::_bindgen_ty_34 =
+ _bindgen_ty_34::NODE_HAS_PROPERTIES;
+ pub const NODE_IS_ANONYMOUS_ROOT: root::_bindgen_ty_34 =
+ _bindgen_ty_34::NODE_IS_ANONYMOUS_ROOT;
+ pub const NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE: root::_bindgen_ty_34 =
+ _bindgen_ty_34::NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE;
+ pub const NODE_IS_NATIVE_ANONYMOUS_ROOT: root::_bindgen_ty_34 =
+ _bindgen_ty_34::NODE_IS_NATIVE_ANONYMOUS_ROOT;
+ pub const NODE_FORCE_XBL_BINDINGS: root::_bindgen_ty_34 =
+ _bindgen_ty_34::NODE_FORCE_XBL_BINDINGS;
+ pub const NODE_MAY_BE_IN_BINDING_MNGR: root::_bindgen_ty_34 =
+ _bindgen_ty_34::NODE_MAY_BE_IN_BINDING_MNGR;
+ pub const NODE_IS_EDITABLE: root::_bindgen_ty_34 =
+ _bindgen_ty_34::NODE_IS_EDITABLE;
+ pub const NODE_MAY_HAVE_CLASS: root::_bindgen_ty_34 =
+ _bindgen_ty_34::NODE_MAY_HAVE_CLASS;
+ pub const NODE_IS_IN_SHADOW_TREE: root::_bindgen_ty_34 =
+ _bindgen_ty_34::NODE_IS_IN_SHADOW_TREE;
+ pub const NODE_HAS_EMPTY_SELECTOR: root::_bindgen_ty_34 =
+ _bindgen_ty_34::NODE_HAS_EMPTY_SELECTOR;
+ pub const NODE_HAS_SLOW_SELECTOR: root::_bindgen_ty_34 =
+ _bindgen_ty_34::NODE_HAS_SLOW_SELECTOR;
+ pub const NODE_HAS_EDGE_CHILD_SELECTOR: root::_bindgen_ty_34 =
+ _bindgen_ty_34::NODE_HAS_EDGE_CHILD_SELECTOR;
+ pub const NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS: root::_bindgen_ty_34 =
+ _bindgen_ty_34::NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS;
+ pub const NODE_ALL_SELECTOR_FLAGS: root::_bindgen_ty_34 =
+ _bindgen_ty_34::NODE_ALL_SELECTOR_FLAGS;
+ pub const NODE_NEEDS_FRAME: root::_bindgen_ty_34 =
+ _bindgen_ty_34::NODE_NEEDS_FRAME;
+ pub const NODE_DESCENDANTS_NEED_FRAMES: root::_bindgen_ty_34 =
+ _bindgen_ty_34::NODE_DESCENDANTS_NEED_FRAMES;
+ pub const NODE_HAS_ACCESSKEY: root::_bindgen_ty_34 =
+ _bindgen_ty_34::NODE_HAS_ACCESSKEY;
+ pub const NODE_HAS_DIRECTION_RTL: root::_bindgen_ty_34 =
+ _bindgen_ty_34::NODE_HAS_DIRECTION_RTL;
+ pub const NODE_HAS_DIRECTION_LTR: root::_bindgen_ty_34 =
+ _bindgen_ty_34::NODE_HAS_DIRECTION_LTR;
+ pub const NODE_ALL_DIRECTION_FLAGS: root::_bindgen_ty_34 =
+ _bindgen_ty_34::NODE_ALL_DIRECTION_FLAGS;
+ pub const NODE_CHROME_ONLY_ACCESS: root::_bindgen_ty_34 =
+ _bindgen_ty_34::NODE_CHROME_ONLY_ACCESS;
+ pub const NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS: root::_bindgen_ty_34 =
+ _bindgen_ty_34::NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS;
+ pub const NODE_SHARED_RESTYLE_BIT_1: root::_bindgen_ty_34 =
+ _bindgen_ty_34::NODE_SHARED_RESTYLE_BIT_1;
+ pub const NODE_SHARED_RESTYLE_BIT_2: root::_bindgen_ty_34 =
+ _bindgen_ty_34::NODE_SHARED_RESTYLE_BIT_2;
+ pub const NODE_HAS_DIRTY_DESCENDANTS_FOR_SERVO: root::_bindgen_ty_34 =
+ _bindgen_ty_34::NODE_SHARED_RESTYLE_BIT_1;
+ pub const NODE_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_34 =
+ _bindgen_ty_34::NODE_TYPE_SPECIFIC_BITS_OFFSET;
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
- pub enum _bindgen_ty_118 {
+ pub enum _bindgen_ty_34 {
NODE_HAS_LISTENERMANAGER = 4,
NODE_HAS_PROPERTIES = 8,
NODE_IS_ANONYMOUS_ROOT = 16,
@@ -10127,21 +10594,21 @@ pub mod root {
}
#[repr(C)]
#[derive(Debug, Copy)]
- pub struct _bindgen_ty_25 {
+ pub struct _bindgen_ty_10 {
pub mInt: root::__BindgenUnionField<i32>,
pub mFloat: root::__BindgenUnionField<f32>,
pub mPointer: root::__BindgenUnionField<*mut ::std::os::raw::c_void>,
pub bindgen_union_field: u64,
}
#[test]
- fn bindgen_test_layout__bindgen_ty_25() {
- assert_eq!(::std::mem::size_of::<_bindgen_ty_25>() , 8usize);
- assert_eq!(::std::mem::align_of::<_bindgen_ty_25>() , 8usize);
+ fn bindgen_test_layout__bindgen_ty_10() {
+ assert_eq!(::std::mem::size_of::<_bindgen_ty_10>() , 8usize);
+ assert_eq!(::std::mem::align_of::<_bindgen_ty_10>() , 8usize);
}
- impl Clone for _bindgen_ty_25 {
+ impl Clone for _bindgen_ty_10 {
fn clone(&self) -> Self { *self }
}
- pub type nsStyleUnion = root::_bindgen_ty_25;
+ pub type nsStyleUnion = root::_bindgen_ty_10;
/**
* Class that hold a single size specification used by the style
* system. The size specification consists of two parts -- a number
@@ -13137,7 +13604,7 @@ pub mod root {
assert_eq!(::std::mem::align_of::<nsCSSValueFloatColor>() , 8usize);
}
#[test]
- fn __bindgen_test_layout_template_8() {
+ fn __bindgen_test_layout_template_9() {
assert_eq!(::std::mem::size_of::<root::mozilla::UniquePtr<root::nsCSSValueList,
root::mozilla::DefaultDelete<root::nsCSSValueList>>>()
, 8usize);
@@ -13146,7 +13613,7 @@ pub mod root {
, 8usize);
}
#[test]
- fn __bindgen_test_layout_template_9() {
+ fn __bindgen_test_layout_template_10() {
assert_eq!(::std::mem::size_of::<root::mozilla::UniquePtr<root::nsCSSValuePairList,
root::mozilla::DefaultDelete<root::nsCSSValuePairList>>>()
, 8usize);
@@ -13528,7 +13995,7 @@ pub mod root {
assert_eq!(::std::mem::align_of::<CachedBorderImageData>() , 8usize);
}
#[test]
- fn __bindgen_test_layout_template_10() {
+ fn __bindgen_test_layout_template_11() {
assert_eq!(::std::mem::size_of::<root::mozilla::UniquePtr<root::nsStyleSides,
root::mozilla::DefaultDelete<root::nsStyleSides>>>()
, 8usize);
@@ -14773,8 +15240,7 @@ pub mod root {
aFeature:
*const root::nsMediaFeature,
aResult:
- *mut root::nsCSSValue)
- -> root::nsresult>;
+ *mut root::nsCSSValue)>;
#[repr(C)]
#[derive(Debug, Copy)]
pub struct nsMediaFeatures {
@@ -14823,201 +15289,247 @@ pub mod root {
assert_eq!(::std::mem::align_of::<nsMediaQuery>() , 8usize);
}
#[test]
- fn __bindgen_test_layout_template_11() {
+ fn __bindgen_test_layout_template_12() {
assert_eq!(::std::mem::size_of::<root::JS::TenuredHeap<*mut root::JSObject>>()
, 8usize);
assert_eq!(::std::mem::align_of::<root::JS::TenuredHeap<*mut root::JSObject>>()
, 8usize);
}
#[test]
- fn __bindgen_test_layout_template_12() {
+ fn __bindgen_test_layout_template_13() {
assert_eq!(::std::mem::size_of::<root::JS::Heap<*mut root::JSObject>>()
, 8usize);
assert_eq!(::std::mem::align_of::<root::JS::Heap<*mut root::JSObject>>()
, 8usize);
}
#[test]
- fn __bindgen_test_layout_template_13() {
+ fn __bindgen_test_layout_template_14() {
assert_eq!(::std::mem::size_of::<root::nsTArray<root::nsCString>>() ,
8usize);
assert_eq!(::std::mem::align_of::<root::nsTArray<root::nsCString>>() ,
8usize);
}
#[test]
- fn __bindgen_test_layout_template_14() {
+ fn __bindgen_test_layout_template_15() {
+ assert_eq!(::std::mem::size_of::<root::mozilla::binding_danger::TErrorResult<root::mozilla::binding_danger::AssertAndSuppressCleanupPolicy>>()
+ , 16usize);
+ assert_eq!(::std::mem::align_of::<root::mozilla::binding_danger::TErrorResult<root::mozilla::binding_danger::AssertAndSuppressCleanupPolicy>>()
+ , 8usize);
+ }
+ #[test]
+ fn __bindgen_test_layout_template_16() {
+ assert_eq!(::std::mem::size_of::<root::mozilla::binding_danger::TErrorResult<root::mozilla::binding_danger::JustSuppressCleanupPolicy>>()
+ , 16usize);
+ assert_eq!(::std::mem::align_of::<root::mozilla::binding_danger::TErrorResult<root::mozilla::binding_danger::JustSuppressCleanupPolicy>>()
+ , 8usize);
+ }
+ #[test]
+ fn __bindgen_test_layout_template_17() {
+ assert_eq!(::std::mem::size_of::<root::mozilla::binding_danger::TErrorResult<root::mozilla::binding_danger::JustAssertCleanupPolicy>>()
+ , 16usize);
+ assert_eq!(::std::mem::align_of::<root::mozilla::binding_danger::TErrorResult<root::mozilla::binding_danger::JustAssertCleanupPolicy>>()
+ , 8usize);
+ }
+ #[test]
+ fn __bindgen_test_layout_template_18() {
assert_eq!(::std::mem::size_of::<root::nsCOMPtr<root::nsIPrincipal>>()
, 8usize);
assert_eq!(::std::mem::align_of::<root::nsCOMPtr<root::nsIPrincipal>>()
, 8usize);
}
#[test]
- fn __bindgen_test_layout_template_15() {
+ fn __bindgen_test_layout_template_19() {
+ assert_eq!(::std::mem::size_of::<[u64; 28usize]>() , 224usize);
+ assert_eq!(::std::mem::align_of::<[u64; 28usize]>() , 8usize);
+ }
+ #[test]
+ fn __bindgen_test_layout_template_20() {
assert_eq!(::std::mem::size_of::<root::RefPtr<root::mozilla::dom::Element>>()
, 8usize);
assert_eq!(::std::mem::align_of::<root::RefPtr<root::mozilla::dom::Element>>()
, 8usize);
}
#[test]
- fn __bindgen_test_layout_template_16() {
+ fn __bindgen_test_layout_template_21() {
assert_eq!(::std::mem::size_of::<root::nsTArray<root::RefPtr<root::mozilla::dom::Element>>>()
, 8usize);
assert_eq!(::std::mem::align_of::<root::nsTArray<root::RefPtr<root::mozilla::dom::Element>>>()
, 8usize);
}
#[test]
- fn __bindgen_test_layout_template_17() {
+ fn __bindgen_test_layout_template_22() {
assert_eq!(::std::mem::size_of::<root::nsCOMPtr<root::nsIObserver>>()
, 8usize);
assert_eq!(::std::mem::align_of::<root::nsCOMPtr<root::nsIObserver>>()
, 8usize);
}
#[test]
- fn __bindgen_test_layout_template_18() {
+ fn __bindgen_test_layout_template_23() {
assert_eq!(::std::mem::size_of::<root::nsCOMPtr<root::nsIWeakReference>>()
, 8usize);
assert_eq!(::std::mem::align_of::<root::nsCOMPtr<root::nsIWeakReference>>()
, 8usize);
}
#[test]
- fn __bindgen_test_layout_template_19() {
+ fn __bindgen_test_layout_template_24() {
+ assert_eq!(::std::mem::size_of::<u64>() , 8usize);
+ assert_eq!(::std::mem::align_of::<u64>() , 8usize);
+ }
+ #[test]
+ fn __bindgen_test_layout_template_25() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>()
, 8usize);
assert_eq!(::std::mem::align_of::<root::nsTArray<*mut root::nsIContent>>()
, 8usize);
}
#[test]
- fn __bindgen_test_layout_template_20() {
+ fn __bindgen_test_layout_template_26() {
assert_eq!(::std::mem::size_of::<root::nsTArray<::nsstring::nsStringRepr>>() ,
8usize);
assert_eq!(::std::mem::align_of::<root::nsTArray<::nsstring::nsStringRepr>>() ,
8usize);
}
#[test]
- fn __bindgen_test_layout_template_21() {
+ fn __bindgen_test_layout_template_27() {
+ assert_eq!(::std::mem::size_of::<[u64; 5usize]>() , 40usize);
+ assert_eq!(::std::mem::align_of::<[u64; 5usize]>() , 8usize);
+ }
+ #[test]
+ fn __bindgen_test_layout_template_28() {
assert_eq!(::std::mem::size_of::<root::mozilla::DefaultDelete<root::mozilla::dom::TimeoutManager>>()
, 1usize);
assert_eq!(::std::mem::align_of::<root::mozilla::DefaultDelete<root::mozilla::dom::TimeoutManager>>()
, 1usize);
}
#[test]
- fn __bindgen_test_layout_template_22() {
+ fn __bindgen_test_layout_template_29() {
assert_eq!(::std::mem::size_of::<root::nsCOMPtr<root::nsIRunnable>>()
, 8usize);
assert_eq!(::std::mem::align_of::<root::nsCOMPtr<root::nsIRunnable>>()
, 8usize);
}
#[test]
- fn __bindgen_test_layout_template_23() {
+ fn __bindgen_test_layout_template_30() {
assert_eq!(::std::mem::size_of::<root::nsAutoPtr<root::nsMediaQuery>>()
, 8usize);
assert_eq!(::std::mem::align_of::<root::nsAutoPtr<root::nsMediaQuery>>()
, 8usize);
}
#[test]
- fn __bindgen_test_layout_template_24() {
+ fn __bindgen_test_layout_template_31() {
assert_eq!(::std::mem::size_of::<root::mozilla::OwningNonNull<root::nsINode>>()
, 8usize);
assert_eq!(::std::mem::align_of::<root::mozilla::OwningNonNull<root::nsINode>>()
, 8usize);
}
#[test]
- fn __bindgen_test_layout_template_25() {
+ fn __bindgen_test_layout_template_32() {
assert_eq!(::std::mem::size_of::<root::nsTArray<f64>>() , 8usize);
assert_eq!(::std::mem::align_of::<root::nsTArray<f64>>() , 8usize);
}
#[test]
- fn __bindgen_test_layout_template_26() {
+ fn __bindgen_test_layout_template_33() {
assert_eq!(::std::mem::size_of::<root::RefPtr<root::mozilla::dom::DOMIntersectionObserverEntry>>()
, 8usize);
assert_eq!(::std::mem::align_of::<root::RefPtr<root::mozilla::dom::DOMIntersectionObserverEntry>>()
, 8usize);
}
#[test]
- fn __bindgen_test_layout_template_27() {
+ fn __bindgen_test_layout_template_34() {
assert_eq!(::std::mem::size_of::<root::nsTArray<root::RefPtr<root::mozilla::dom::DOMIntersectionObserverEntry>>>()
, 8usize);
assert_eq!(::std::mem::align_of::<root::nsTArray<root::RefPtr<root::mozilla::dom::DOMIntersectionObserverEntry>>>()
, 8usize);
}
#[test]
- fn __bindgen_test_layout_template_28() {
+ fn __bindgen_test_layout_template_35() {
assert_eq!(::std::mem::size_of::<root::nsMainThreadPtrHolder<root::nsIURI>>()
, 24usize);
assert_eq!(::std::mem::align_of::<root::nsMainThreadPtrHolder<root::nsIURI>>()
, 8usize);
}
#[test]
- fn __bindgen_test_layout_template_29() {
+ fn __bindgen_test_layout_template_36() {
assert_eq!(::std::mem::size_of::<root::nsMainThreadPtrHolder<root::nsIPrincipal>>()
, 24usize);
assert_eq!(::std::mem::align_of::<root::nsMainThreadPtrHolder<root::nsIPrincipal>>()
, 8usize);
}
#[test]
- fn __bindgen_test_layout_template_30() {
+ fn __bindgen_test_layout_template_37() {
assert_eq!(::std::mem::size_of::<root::nsPtrHashKey<root::nsIFrame>>()
, 16usize);
assert_eq!(::std::mem::align_of::<root::nsPtrHashKey<root::nsIFrame>>()
, 8usize);
}
#[test]
- fn __bindgen_test_layout_template_31() {
+ fn __bindgen_test_layout_template_38() {
assert_eq!(::std::mem::size_of::<root::nsTArray<root::mozilla::DisplayItemClip_RoundedRect>>()
, 8usize);
assert_eq!(::std::mem::align_of::<root::nsTArray<root::mozilla::DisplayItemClip_RoundedRect>>()
, 8usize);
}
#[test]
- fn __bindgen_test_layout_template_32() {
+ fn __bindgen_test_layout_template_39() {
assert_eq!(::std::mem::size_of::<root::RefPtr<root::mozilla::dom::DOMRect>>()
, 8usize);
assert_eq!(::std::mem::align_of::<root::RefPtr<root::mozilla::dom::DOMRect>>()
, 8usize);
}
#[test]
- fn __bindgen_test_layout_template_33() {
+ fn __bindgen_test_layout_template_40() {
assert_eq!(::std::mem::size_of::<root::mozilla::DefaultDelete<root::ProxyBehaviour>>()
, 1usize);
assert_eq!(::std::mem::align_of::<root::mozilla::DefaultDelete<root::ProxyBehaviour>>()
, 1usize);
}
#[test]
- fn __bindgen_test_layout_template_34() {
+ fn __bindgen_test_layout_template_41() {
assert_eq!(::std::mem::size_of::<root::mozilla::DefaultDelete<root::nsCSSValueList>>()
, 1usize);
assert_eq!(::std::mem::align_of::<root::mozilla::DefaultDelete<root::nsCSSValueList>>()
, 1usize);
}
#[test]
- fn __bindgen_test_layout_template_35() {
+ fn __bindgen_test_layout_template_42() {
assert_eq!(::std::mem::size_of::<root::mozilla::DefaultDelete<root::nsCSSValuePairList>>()
, 1usize);
assert_eq!(::std::mem::align_of::<root::mozilla::DefaultDelete<root::nsCSSValuePairList>>()
, 1usize);
}
#[test]
- fn __bindgen_test_layout_template_36() {
+ fn __bindgen_test_layout_template_43() {
+ assert_eq!(::std::mem::size_of::<u64>() , 8usize);
+ assert_eq!(::std::mem::align_of::<u64>() , 8usize);
+ }
+ #[test]
+ fn __bindgen_test_layout_template_44() {
+ assert_eq!(::std::mem::size_of::<[u64; 2usize]>() , 16usize);
+ assert_eq!(::std::mem::align_of::<[u64; 2usize]>() , 8usize);
+ }
+ #[test]
+ fn __bindgen_test_layout_template_45() {
assert_eq!(::std::mem::size_of::<root::mozilla::DefaultDelete<root::nsStyleSides>>()
, 1usize);
assert_eq!(::std::mem::align_of::<root::mozilla::DefaultDelete<root::nsStyleSides>>()
, 1usize);
}
#[test]
- fn __bindgen_test_layout_template_37() {
+ fn __bindgen_test_layout_template_46() {
assert_eq!(::std::mem::size_of::<root::mozilla::DefaultDelete<root::CachedBorderImageData>>()
, 1usize);
assert_eq!(::std::mem::align_of::<root::mozilla::DefaultDelete<root::CachedBorderImageData>>()
, 1usize);
}
#[test]
- fn __bindgen_test_layout_template_38() {
+ fn __bindgen_test_layout_template_47() {
assert_eq!(::std::mem::size_of::<root::std::pair<::nsstring::nsStringRepr, ::nsstring::nsStringRepr>>()
, 32usize);
assert_eq!(::std::mem::align_of::<root::std::pair<::nsstring::nsStringRepr, ::nsstring::nsStringRepr>>()
, 8usize);
}
#[test]
- fn __bindgen_test_layout_template_39() {
+ fn __bindgen_test_layout_template_48() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::css::DocumentRule>>()
, 8usize);
assert_eq!(::std::mem::align_of::<root::nsTArray<*mut root::mozilla::css::DocumentRule>>()
diff --git a/components/style/properties/longhand/box.mako.rs b/components/style/properties/longhand/box.mako.rs
index ec3097210ad..5bac0d7dab7 100644
--- a/components/style/properties/longhand/box.mako.rs
+++ b/components/style/properties/longhand/box.mako.rs
@@ -19,10 +19,11 @@
values = """inline block inline-block
table inline-table table-row-group table-header-group table-footer-group
table-row table-column-group table-column table-cell table-caption
- list-item flex none
+ list-item flex inline-flex
+ none
""".split()
if product == "gecko":
- values += """inline-flex grid inline-grid ruby ruby-base ruby-base-container
+ values += """grid inline-grid ruby ruby-base ruby-base-container
ruby-text ruby-text-container contents flow-root -webkit-box
-webkit-inline-box -moz-box -moz-inline-box -moz-grid -moz-inline-grid
-moz-grid-group -moz-grid-line -moz-stack -moz-inline-stack -moz-deck
diff --git a/components/style/properties/properties.mako.rs b/components/style/properties/properties.mako.rs
index ec6873f436a..ca30e123dcc 100644
--- a/components/style/properties/properties.mako.rs
+++ b/components/style/properties/properties.mako.rs
@@ -1953,8 +1953,10 @@ pub fn apply_declarations<'a, F, I>(viewport_size: Size2D<Au>,
let is_item = matches!(context.inherited_style.get_box().clone_display(),
% if product == "gecko":
computed_values::display::T::grid |
+ computed_values::display::T::inline_grid |
% endif
- computed_values::display::T::flex);
+ computed_values::display::T::flex |
+ computed_values::display::T::inline_flex);
let (blockify_root, blockify_item) = match flags.contains(SKIP_ROOT_AND_ITEM_BASED_DISPLAY_FIXUP) {
false => (is_root_element, is_item),
true => (false, false),
diff --git a/components/style/properties/shorthand/font.mako.rs b/components/style/properties/shorthand/font.mako.rs
index 7742ab11be5..f058c56a777 100644
--- a/components/style/properties/shorthand/font.mako.rs
+++ b/components/style/properties/shorthand/font.mako.rs
@@ -4,21 +4,22 @@
<%namespace name="helpers" file="/helpers.mako.rs" />
-<%helpers:shorthand name="font" sub_properties="font-style font-variant font-weight
+<%helpers:shorthand name="font" sub_properties="font-style font-variant font-weight font-stretch
font-size line-height font-family"
spec="https://drafts.csswg.org/css-fonts-3/#propdef-font">
- use properties::longhands::{font_style, font_variant, font_weight, font_size,
- line_height, font_family};
+ use properties::longhands::{font_style, font_variant, font_weight, font_stretch};
+ use properties::longhands::{font_size, line_height, font_family};
pub fn parse_value(context: &ParserContext, input: &mut Parser) -> Result<Longhands, ()> {
let mut nb_normals = 0;
let mut style = None;
let mut variant = None;
let mut weight = None;
+ let mut stretch = None;
let size;
loop {
// Special-case 'normal' because it is valid in each of
- // font-style, font-weight and font-variant.
+ // font-style, font-weight, font-variant and font-stretch.
// Leaves the values to None, 'normal' is the initial value for each of them.
if input.try(|input| input.expect_ident_matching("normal")).is_ok() {
nb_normals += 1;
@@ -42,6 +43,12 @@
continue
}
}
+ if stretch.is_none() {
+ if let Ok(value) = input.try(|input| font_stretch::parse(context, input)) {
+ stretch = Some(value);
+ continue
+ }
+ }
size = Some(try!(font_size::parse(context, input)));
break
}
@@ -49,7 +56,7 @@
fn count<T>(opt: &Option<T>) -> u8 {
if opt.is_some() { 1 } else { 0 }
}
- if size.is_none() || (count(&style) + count(&weight) + count(&variant) + nb_normals) > 3 {
+ if size.is_none() || (count(&style) + count(&weight) + count(&variant) + count(&stretch) + nb_normals) > 4 {
return Err(())
}
let line_height = if input.try(|input| input.expect_delim('/')).is_ok() {
@@ -62,6 +69,7 @@
font_style: style,
font_variant: variant,
font_weight: weight,
+ font_stretch: stretch,
font_size: size,
line_height: line_height,
font_family: Some(font_family::SpecifiedValue(family))
@@ -86,6 +94,11 @@
try!(write!(dest, " "));
}
+ if let DeclaredValue::Value(ref stretch) = *self.font_stretch {
+ try!(stretch.to_css(dest));
+ try!(write!(dest, " "));
+ }
+
try!(self.font_size.to_css(dest));
if let DeclaredValue::Value(ref height) = *self.line_height {
match *height {
diff --git a/ports/geckolib/Cargo.toml b/ports/geckolib/Cargo.toml
index c99a187e39e..48568fc95f0 100644
--- a/ports/geckolib/Cargo.toml
+++ b/ports/geckolib/Cargo.toml
@@ -23,7 +23,7 @@ libc = "0.2"
log = {version = "0.3.5", features = ["release_max_level_info"]}
num_cpus = "1.1.0"
parking_lot = "0.3"
-selectors = "0.15"
+selectors = "0.15.1"
servo_url = {path = "../../components/url"}
style = {path = "../../components/style", features = ["gecko"]}
style_traits = {path = "../../components/style_traits"}
diff --git a/tests/compiletest/plugin/compile-fail/trustedpromise_mustnot_deriveclone.rs b/tests/compiletest/plugin/compile-fail/trustedpromise_mustnot_deriveclone.rs
new file mode 100644
index 00000000000..08d684d4e4a
--- /dev/null
+++ b/tests/compiletest/plugin/compile-fail/trustedpromise_mustnot_deriveclone.rs
@@ -0,0 +1,18 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#![feature(plugin)]
+#![plugin(plugins)]
+
+extern crate script;
+
+use script::test::TrustedPromise;
+
+fn cloneable<T: Clone>() {
+}
+
+fn main() {
+ cloneable::<TrustedPromise>();
+ //~^ ERROR the trait bound `script::test::TrustedPromise: std::clone::Clone` is not satisfied
+}
diff --git a/tests/heartbeats/characterize.py b/tests/heartbeats/characterize.py
index 948f5b9de43..22f2028e388 100644
--- a/tests/heartbeats/characterize.py
+++ b/tests/heartbeats/characterize.py
@@ -210,9 +210,6 @@ def main():
parser.add_argument("-d", "--debug",
action='store_true',
help="Use debug build instead of release build")
- parser.add_argument("-w", "--webrender",
- action='store_true',
- help="Use webrender backend")
parser.add_argument("-l", "--max_layout_threads",
help="Specify the maximum number of threads for layout, for example \"-l 5\"")
parser.add_argument("-o", "--output",
@@ -233,8 +230,6 @@ def main():
benchmark = args.benchmark
if args.debug:
build_target = "debug"
- if args.webrender:
- renderer = "-w"
if args.max_layout_threads:
max_layout_threads = int(args.max_layout_threads)
if args.output:
diff --git a/tests/heartbeats/characterize_android.py b/tests/heartbeats/characterize_android.py
index aae26ac2cbb..0b9b0807fe5 100644
--- a/tests/heartbeats/characterize_android.py
+++ b/tests/heartbeats/characterize_android.py
@@ -85,9 +85,6 @@ def main():
parser.add_argument("-b", "--benchmark",
default=benchmark,
help="Gets the benchmark, for example \"-b http://www.example.com\"")
- parser.add_argument("-w", "--webrender",
- action='store_true',
- help="Use webrender backend")
parser.add_argument("-l", "--layout_threads",
help="Specify the number of threads for layout, for example \"-l 5\"")
parser.add_argument("-o", "--output",
@@ -99,8 +96,6 @@ def main():
args = parser.parse_args()
if args.benchmark:
benchmark = args.benchmark
- if args.webrender:
- renderer = "-w"
if args.layout_threads:
layout_threads = int(args.layout_threads)
if args.output:
diff --git a/tests/unit/style/Cargo.toml b/tests/unit/style/Cargo.toml
index 69e5c3e9991..cfbac8127d1 100644
--- a/tests/unit/style/Cargo.toml
+++ b/tests/unit/style/Cargo.toml
@@ -22,7 +22,7 @@ owning_ref = "0.2.2"
parking_lot = "0.3"
rayon = "0.6"
rustc-serialize = "0.3"
-selectors = "0.15"
+selectors = "0.15.1"
servo_atoms = {path = "../../../components/atoms"}
servo_config = {path = "../../../components/config"}
style = {path = "../../../components/style"}
diff --git a/tests/unit/stylo/Cargo.toml b/tests/unit/stylo/Cargo.toml
index 81722cc7b5a..b656443cff1 100644
--- a/tests/unit/stylo/Cargo.toml
+++ b/tests/unit/stylo/Cargo.toml
@@ -22,7 +22,7 @@ libc = "0.2"
log = {version = "0.3.5", features = ["release_max_level_info"]}
num_cpus = "1.1.0"
parking_lot = "0.3"
-selectors = "0.15"
+selectors = "0.15.1"
servo_url = {path = "../../../components/url"}
style_traits = {path = "../../../components/style_traits"}
geckoservo = {path = "../../../ports/geckolib"}
diff --git a/tests/wpt/harness/wptrunner/browsers/servo.py b/tests/wpt/harness/wptrunner/browsers/servo.py
index 2eeb5aaa158..64f572d331a 100644
--- a/tests/wpt/harness/wptrunner/browsers/servo.py
+++ b/tests/wpt/harness/wptrunner/browsers/servo.py
@@ -10,17 +10,20 @@ from ..executors.executorservo import ServoTestharnessExecutor, ServoRefTestExec
here = os.path.join(os.path.split(__file__)[0])
-__wptrunner__ = {"product": "servo",
- "check_args": "check_args",
- "browser": "ServoBrowser",
- "executor": {"testharness": "ServoTestharnessExecutor",
- "reftest": "ServoRefTestExecutor",
- "wdspec": "ServoWdspecExecutor"},
- "browser_kwargs": "browser_kwargs",
- "executor_kwargs": "executor_kwargs",
- "env_options": "env_options",
- "run_info_extras": "run_info_extras",
- "update_properties": "update_properties"}
+__wptrunner__ = {
+ "product": "servo",
+ "check_args": "check_args",
+ "browser": "ServoBrowser",
+ "executor": {
+ "testharness": "ServoTestharnessExecutor",
+ "reftest": "ServoRefTestExecutor",
+ "wdspec": "ServoWdspecExecutor",
+ },
+ "browser_kwargs": "browser_kwargs",
+ "executor_kwargs": "executor_kwargs",
+ "env_options": "env_options",
+ "update_properties": "update_properties",
+}
def check_args(**kwargs):
@@ -28,11 +31,12 @@ def check_args(**kwargs):
def browser_kwargs(**kwargs):
- return {"binary": kwargs["binary"],
- "debug_info": kwargs["debug_info"],
- "binary_args": kwargs["binary_args"],
- "user_stylesheets": kwargs.get("user_stylesheets"),
- "render_backend": kwargs.get("servo_backend")}
+ return {
+ "binary": kwargs["binary"],
+ "debug_info": kwargs["debug_info"],
+ "binary_args": kwargs["binary_args"],
+ "user_stylesheets": kwargs.get("user_stylesheets"),
+ }
def executor_kwargs(test_type, server_config, cache_manager, run_info_data,
@@ -51,31 +55,23 @@ def env_options():
"supports_debugger": True}
-def run_info_extras(**kwargs):
- return {"backend": kwargs["servo_backend"]}
-
-
def update_properties():
- return ["debug", "os", "version", "processor", "bits", "backend"], None
-
-
-def render_arg(render_backend):
- return {"cpu": "--cpu", "webrender": "-w"}[render_backend]
+ return ["debug", "os", "version", "processor", "bits"], None
class ServoBrowser(NullBrowser):
def __init__(self, logger, binary, debug_info=None, binary_args=None,
- user_stylesheets=None, render_backend="webrender"):
+ user_stylesheets=None):
NullBrowser.__init__(self, logger)
self.binary = binary
self.debug_info = debug_info
self.binary_args = binary_args or []
self.user_stylesheets = user_stylesheets or []
- self.render_backend = render_backend
def executor_browser(self):
- return ExecutorBrowser, {"binary": self.binary,
- "debug_info": self.debug_info,
- "binary_args": self.binary_args,
- "user_stylesheets": self.user_stylesheets,
- "render_backend": self.render_backend}
+ return ExecutorBrowser, {
+ "binary": self.binary,
+ "debug_info": self.debug_info,
+ "binary_args": self.binary_args,
+ "user_stylesheets": self.user_stylesheets,
+ }
diff --git a/tests/wpt/harness/wptrunner/browsers/servodriver.py b/tests/wpt/harness/wptrunner/browsers/servodriver.py
index ab4dc7956b9..4f4a7867168 100644
--- a/tests/wpt/harness/wptrunner/browsers/servodriver.py
+++ b/tests/wpt/harness/wptrunner/browsers/servodriver.py
@@ -9,23 +9,25 @@ import tempfile
from mozprocess import ProcessHandler
from .base import Browser, require_arg, get_free_port, browser_command, ExecutorBrowser
-from .servo import render_arg
from ..executors import executor_kwargs as base_executor_kwargs
from ..executors.executorservodriver import (ServoWebDriverTestharnessExecutor,
ServoWebDriverRefTestExecutor)
here = os.path.join(os.path.split(__file__)[0])
-__wptrunner__ = {"product": "servodriver",
- "check_args": "check_args",
- "browser": "ServoWebDriverBrowser",
- "executor": {"testharness": "ServoWebDriverTestharnessExecutor",
- "reftest": "ServoWebDriverRefTestExecutor"},
- "browser_kwargs": "browser_kwargs",
- "executor_kwargs": "executor_kwargs",
- "env_options": "env_options",
- "run_info_extras": "run_info_extras",
- "update_properties": "update_properties"}
+__wptrunner__ = {
+ "product": "servodriver",
+ "check_args": "check_args",
+ "browser": "ServoWebDriverBrowser",
+ "executor": {
+ "testharness": "ServoWebDriverTestharnessExecutor",
+ "reftest": "ServoWebDriverRefTestExecutor",
+ },
+ "browser_kwargs": "browser_kwargs",
+ "executor_kwargs": "executor_kwargs",
+ "env_options": "env_options",
+ "update_properties": "update_properties",
+}
hosts_text = """127.0.0.1 web-platform.test
127.0.0.1 www.web-platform.test
@@ -41,10 +43,11 @@ def check_args(**kwargs):
def browser_kwargs(**kwargs):
- return {"binary": kwargs["binary"],
- "debug_info": kwargs["debug_info"],
- "user_stylesheets": kwargs.get("user_stylesheets"),
- "render_backend": kwargs.get("servo_backend")}
+ return {
+ "binary": kwargs["binary"],
+ "debug_info": kwargs["debug_info"],
+ "user_stylesheets": kwargs.get("user_stylesheets"),
+ }
def executor_kwargs(test_type, server_config, cache_manager, run_info_data, **kwargs):
@@ -61,12 +64,8 @@ def env_options():
"supports_debugger": True}
-def run_info_extras(**kwargs):
- return {"backend": kwargs["servo_backend"]}
-
-
def update_properties():
- return ["debug", "os", "version", "processor", "bits", "backend"], None
+ return ["debug", "os", "version", "processor", "bits"], None
def make_hosts_file():
@@ -80,7 +79,7 @@ class ServoWebDriverBrowser(Browser):
used_ports = set()
def __init__(self, logger, binary, debug_info=None, webdriver_host="127.0.0.1",
- user_stylesheets=None, render_backend="webrender"):
+ user_stylesheets=None):
Browser.__init__(self, logger)
self.binary = binary
self.webdriver_host = webdriver_host
@@ -90,7 +89,6 @@ class ServoWebDriverBrowser(Browser):
self.hosts_path = make_hosts_file()
self.command = None
self.user_stylesheets = user_stylesheets if user_stylesheets else []
- self.render_backend = render_backend
def start(self):
self.webdriver_port = get_free_port(4444, exclude=self.used_ports)
@@ -100,11 +98,15 @@ class ServoWebDriverBrowser(Browser):
env["HOST_FILE"] = self.hosts_path
env["RUST_BACKTRACE"] = "1"
- debug_args, command = browser_command(self.binary,
- [render_arg(self.render_backend), "--hard-fail",
- "--webdriver", str(self.webdriver_port),
- "about:blank"],
- self.debug_info)
+ debug_args, command = browser_command(
+ self.binary,
+ [
+ "--hard-fail",
+ "--webdriver", str(self.webdriver_port),
+ "about:blank",
+ ],
+ self.debug_info
+ )
for stylesheet in self.user_stylesheets:
command += ["--user-stylesheet", stylesheet]
diff --git a/tests/wpt/harness/wptrunner/executors/executorservo.py b/tests/wpt/harness/wptrunner/executors/executorservo.py
index b627223a7df..99374f6f4a3 100644
--- a/tests/wpt/harness/wptrunner/executors/executorservo.py
+++ b/tests/wpt/harness/wptrunner/executors/executorservo.py
@@ -30,15 +30,10 @@ from ..webdriver_server import ServoDriverServer
from .executormarionette import WdspecRun
pytestrunner = None
-render_arg = None
webdriver = None
extra_timeout = 5 # seconds
-def do_delayed_imports():
- global render_arg
- from ..browsers.servo import render_arg
-
hosts_text = """127.0.0.1 web-platform.test
127.0.0.1 www.web-platform.test
127.0.0.1 www1.web-platform.test
@@ -80,8 +75,10 @@ class ServoTestharnessExecutor(ProcessTestExecutor):
self.result_data = None
self.result_flag = threading.Event()
- args = [render_arg(self.browser.render_backend), "--hard-fail", "-u", "Servo/wptrunner",
- "-Z", "replace-surrogates", "-z", self.test_url(test)]
+ args = [
+ "--hard-fail", "-u", "Servo/wptrunner",
+ "-Z", "replace-surrogates", "-z", self.test_url(test),
+ ]
for stylesheet in self.browser.user_stylesheets:
args += ["--user-stylesheet", stylesheet]
for pref, value in test.environment.get('prefs', {}).iteritems():
@@ -213,9 +210,12 @@ class ServoRefTestExecutor(ProcessTestExecutor):
with TempFilename(self.tempdir) as output_path:
debug_args, command = browser_command(
self.binary,
- [render_arg(self.browser.render_backend), "--hard-fail", "--exit",
- "-u", "Servo/wptrunner", "-Z", "disable-text-aa,load-webfonts-synchronously,replace-surrogates",
- "--output=%s" % output_path, full_url] + self.browser.binary_args,
+ [
+ "--hard-fail", "--exit",
+ "-u", "Servo/wptrunner",
+ "-Z", "disable-text-aa,load-webfonts-synchronously,replace-surrogates",
+ "--output=%s" % output_path, full_url
+ ] + self.browser.binary_args,
self.debug_info)
for stylesheet in self.browser.user_stylesheets:
@@ -295,7 +295,7 @@ class ServoWdspecProtocol(Protocol):
def setup(self, runner):
try:
- self.server = ServoDriverServer(self.logger, binary=self.browser.binary, binary_args=self.browser.binary_args, render_backend=self.browser.render_backend)
+ self.server = ServoDriverServer(self.logger, binary=self.browser.binary, binary_args=self.browser.binary_args)
self.server.start(block=False)
self.logger.info(
"WebDriver HTTP server listening at %s" % self.server.url)
diff --git a/tests/wpt/harness/wptrunner/webdriver_server.py b/tests/wpt/harness/wptrunner/webdriver_server.py
index 3b2b095a4a5..65c996d36d9 100644
--- a/tests/wpt/harness/wptrunner/webdriver_server.py
+++ b/tests/wpt/harness/wptrunner/webdriver_server.py
@@ -165,12 +165,11 @@ class GeckoDriverServer(WebDriverServer):
class ServoDriverServer(WebDriverServer):
- def __init__(self, logger, binary="servo", binary_args=None, host="127.0.0.1", port=None, render_backend=None):
+ def __init__(self, logger, binary="servo", binary_args=None, host="127.0.0.1", port=None):
env = os.environ.copy()
env["RUST_BACKTRACE"] = "1"
WebDriverServer.__init__(self, logger, binary, host=host, port=port, env=env)
self.binary_args = binary_args
- self.render_backend = render_backend
def make_command(self):
command = [self.binary,
@@ -179,10 +178,6 @@ class ServoDriverServer(WebDriverServer):
"--headless"]
if self.binary_args:
command += self.binary_args
- if self.render_backend == "cpu":
- command += ["--cpu"]
- elif self.render_backend == "webrender":
- command += ["--webrender"]
return command
diff --git a/tests/wpt/harness/wptrunner/wptcommandline.py b/tests/wpt/harness/wptrunner/wptcommandline.py
index 38e7b8f5363..6b2c078730c 100644
--- a/tests/wpt/harness/wptrunner/wptcommandline.py
+++ b/tests/wpt/harness/wptrunner/wptcommandline.py
@@ -178,10 +178,6 @@ scheme host and port.""")
servo_group.add_argument("--user-stylesheet",
default=[], action="append", dest="user_stylesheets",
help="Inject a user CSS stylesheet into every test.")
- servo_group.add_argument("--servo-backend",
- default="webrender", choices=["cpu", "webrender"],
- help="Rendering backend to use with Servo.")
-
parser.add_argument("test_list", nargs="*",
help="List of URLs for tests to run, or paths including tests to run. "
diff --git a/tests/wpt/metadata-css/css-flexbox-1_dev/html/display_inline-flex_exist.htm.ini b/tests/wpt/metadata-css/css-flexbox-1_dev/html/display_inline-flex_exist.htm.ini
deleted file mode 100644
index 91449bc2efe..00000000000
--- a/tests/wpt/metadata-css/css-flexbox-1_dev/html/display_inline-flex_exist.htm.ini
+++ /dev/null
@@ -1,5 +0,0 @@
-[display_inline-flex_exist.htm]
- type: testharness
- [CSS Flexible Box Test: display_inline-flex]
- expected: FAIL
-
diff --git a/tests/wpt/metadata-css/css-flexbox-1_dev/html/flexbox_computedstyle_display-inline.htm.ini b/tests/wpt/metadata-css/css-flexbox-1_dev/html/flexbox_computedstyle_display-inline.htm.ini
deleted file mode 100644
index bfb3632381e..00000000000
--- a/tests/wpt/metadata-css/css-flexbox-1_dev/html/flexbox_computedstyle_display-inline.htm.ini
+++ /dev/null
@@ -1,5 +0,0 @@
-[flexbox_computedstyle_display-inline.htm]
- type: testharness
- [flexbox | computed style | display: inline-flex]
- expected: FAIL
-
diff --git a/tests/wpt/metadata-css/css-flexbox-1_dev/html/flexbox_inline.htm.ini b/tests/wpt/metadata-css/css-flexbox-1_dev/html/flexbox_inline.htm.ini
deleted file mode 100644
index fdd0f79122b..00000000000
--- a/tests/wpt/metadata-css/css-flexbox-1_dev/html/flexbox_inline.htm.ini
+++ /dev/null
@@ -1,3 +0,0 @@
-[flexbox_inline.htm]
- type: reftest
- expected: FAIL
diff --git a/tests/wpt/metadata-css/css-flexbox-1_dev/html/ttwf-reftest-flex-inline.htm.ini b/tests/wpt/metadata-css/css-flexbox-1_dev/html/ttwf-reftest-flex-inline.htm.ini
deleted file mode 100644
index 4f004f76131..00000000000
--- a/tests/wpt/metadata-css/css-flexbox-1_dev/html/ttwf-reftest-flex-inline.htm.ini
+++ /dev/null
@@ -1,3 +0,0 @@
-[ttwf-reftest-flex-inline.htm]
- type: reftest
- expected: FAIL
diff --git a/tests/wpt/metadata/dom/events/EventTarget-dispatchEvent.html.ini b/tests/wpt/metadata/dom/events/EventTarget-dispatchEvent.html.ini
index 201224d1802..cdf64e987c2 100644
--- a/tests/wpt/metadata/dom/events/EventTarget-dispatchEvent.html.ini
+++ b/tests/wpt/metadata/dom/events/EventTarget-dispatchEvent.html.ini
@@ -3,9 +3,6 @@
[If the event's initialized flag is not set, an InvalidStateError must be thrown (AnimationEvent).]
expected: FAIL
- [If the event's initialized flag is not set, an InvalidStateError must be thrown (BeforeUnloadEvent).]
- expected: FAIL
-
[If the event's initialized flag is not set, an InvalidStateError must be thrown (CompositionEvent).]
expected: FAIL
diff --git a/tests/wpt/metadata/dom/nodes/Document-createEvent.html.ini b/tests/wpt/metadata/dom/nodes/Document-createEvent.html.ini
index c8062768eb4..783ad1e01c5 100644
--- a/tests/wpt/metadata/dom/nodes/Document-createEvent.html.ini
+++ b/tests/wpt/metadata/dom/nodes/Document-createEvent.html.ini
@@ -19,24 +19,6 @@
[createEvent('ANIMATIONEVENT') should be initialized correctly.]
expected: FAIL
- [BeforeUnloadEvent should be an alias for BeforeUnloadEvent.]
- expected: FAIL
-
- [createEvent('BeforeUnloadEvent') should be initialized correctly.]
- expected: FAIL
-
- [beforeunloadevent should be an alias for BeforeUnloadEvent.]
- expected: FAIL
-
- [createEvent('beforeunloadevent') should be initialized correctly.]
- expected: FAIL
-
- [BEFOREUNLOADEVENT should be an alias for BeforeUnloadEvent.]
- expected: FAIL
-
- [createEvent('BEFOREUNLOADEVENT') should be initialized correctly.]
- expected: FAIL
-
[CompositionEvent should be an alias for CompositionEvent.]
expected: FAIL
diff --git a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/canvas/to-data-url-test.html.ini b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/canvas/to-data-url-test.html.ini
index 11c670ec1ab..c57a75b9b7f 100644
--- a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/canvas/to-data-url-test.html.ini
+++ b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/canvas/to-data-url-test.html.ini
@@ -3,4 +3,3 @@
expected:
if os == "linux": TIMEOUT
if os == "mac": CRASH
- if not debug and (os == "mac") and (version == "OS X 10.10.5") and (processor == "x86_64") and (bits == 64) and (backend == "cpu"): CRASH
diff --git a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/context/constants-and-properties.html.ini b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/context/constants-and-properties.html.ini
index 678d0b3b207..8d71d201fe5 100644
--- a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/context/constants-and-properties.html.ini
+++ b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/context/constants-and-properties.html.ini
@@ -2,4 +2,3 @@
type: testharness
expected:
if os == "mac": CRASH
- if not debug and (os == "mac") and (version == "OS X 10.10.5") and (processor == "x86_64") and (bits == 64) and (backend == "cpu"): CRASH
diff --git a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/context/context-attribute-preserve-drawing-buffer.html.ini b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/context/context-attribute-preserve-drawing-buffer.html.ini
index 4ffd392fe67..665db3d3854 100644
--- a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/context/context-attribute-preserve-drawing-buffer.html.ini
+++ b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/context/context-attribute-preserve-drawing-buffer.html.ini
@@ -3,4 +3,3 @@
expected:
if os == "linux": TIMEOUT
if os == "mac": CRASH
- if not debug and (os == "mac") and (version == "OS X 10.10.5") and (processor == "x86_64") and (bits == 64) and (backend == "cpu"): CRASH
diff --git a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/context/context-creation-and-destruction.html.ini b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/context/context-creation-and-destruction.html.ini
index 1b7cd37a3da..8ea5e0cb173 100644
--- a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/context/context-creation-and-destruction.html.ini
+++ b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/context/context-creation-and-destruction.html.ini
@@ -3,4 +3,3 @@
expected:
if os == "linux": TIMEOUT
if os == "mac": CRASH
- if not debug and (os == "mac") and (version == "OS X 10.10.5") and (processor == "x86_64") and (bits == 64) and (backend == "cpu"): CRASH
diff --git a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/context/context-creation.html.ini b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/context/context-creation.html.ini
index 8e4ce10380d..5c14b32b61a 100644
--- a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/context/context-creation.html.ini
+++ b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/context/context-creation.html.ini
@@ -3,4 +3,3 @@
expected:
if os == "linux": TIMEOUT
if os == "mac": CRASH
- if not debug and (os == "mac") and (version == "OS X 10.10.5") and (processor == "x86_64") and (bits == 64) and (backend == "cpu"): CRASH
diff --git a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/context/context-hidden-alpha.html.ini b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/context/context-hidden-alpha.html.ini
index 594c48aaffb..37267c86521 100644
--- a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/context/context-hidden-alpha.html.ini
+++ b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/context/context-hidden-alpha.html.ini
@@ -2,4 +2,3 @@
type: testharness
expected:
if os == "mac": CRASH
- if not debug and (os == "mac") and (version == "OS X 10.10.5") and (processor == "x86_64") and (bits == 64) and (backend == "cpu"): CRASH
diff --git a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/context/context-lost-restored.html.ini b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/context/context-lost-restored.html.ini
index adda8b8b6a1..a1421962f10 100644
--- a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/context/context-lost-restored.html.ini
+++ b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/context/context-lost-restored.html.ini
@@ -2,4 +2,3 @@
type: testharness
expected:
if os == "mac": CRASH
- if not debug and (os == "mac") and (version == "OS X 10.10.5") and (processor == "x86_64") and (bits == 64) and (backend == "cpu"): CRASH
diff --git a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/context/context-release-upon-reload.html.ini b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/context/context-release-upon-reload.html.ini
index 477e59cb772..dba75970ad4 100644
--- a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/context/context-release-upon-reload.html.ini
+++ b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/context/context-release-upon-reload.html.ini
@@ -3,4 +3,3 @@
expected:
if os == "linux": TIMEOUT
if os == "mac": CRASH
- if not debug and (os == "mac") and (version == "OS X 10.10.5") and (processor == "x86_64") and (bits == 64) and (backend == "cpu"): CRASH
diff --git a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/context/context-release-with-workers.html.ini b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/context/context-release-with-workers.html.ini
index f177cdceb1a..5296158d3e4 100644
--- a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/context/context-release-with-workers.html.ini
+++ b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/context/context-release-with-workers.html.ini
@@ -3,4 +3,3 @@
expected:
if os == "linux": TIMEOUT
if os == "mac": CRASH
- if not debug and (os == "mac") and (version == "OS X 10.10.5") and (processor == "x86_64") and (bits == 64) and (backend == "cpu"): CRASH
diff --git a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/context/context-type-test.html.ini b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/context/context-type-test.html.ini
index 43e33a30281..d6be69e656d 100644
--- a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/context/context-type-test.html.ini
+++ b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/context/context-type-test.html.ini
@@ -2,4 +2,3 @@
type: testharness
expected:
if os == "mac": CRASH
- if not debug and (os == "mac") and (version == "OS X 10.10.5") and (processor == "x86_64") and (bits == 64) and (backend == "cpu"): CRASH
diff --git a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/extensions/angle-instanced-arrays-out-of-bounds.html.ini b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/extensions/angle-instanced-arrays-out-of-bounds.html.ini
index f5c3b343f16..ccfd211cbad 100644
--- a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/extensions/angle-instanced-arrays-out-of-bounds.html.ini
+++ b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/extensions/angle-instanced-arrays-out-of-bounds.html.ini
@@ -2,4 +2,3 @@
type: testharness
expected:
if os == "mac": CRASH
- if not debug and (os == "mac") and (version == "OS X 10.10.5") and (processor == "x86_64") and (bits == 64) and (backend == "cpu"): CRASH
diff --git a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/extensions/angle-instanced-arrays.html.ini b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/extensions/angle-instanced-arrays.html.ini
index 8593a9e88b8..21e7799d9a5 100644
--- a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/extensions/angle-instanced-arrays.html.ini
+++ b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/extensions/angle-instanced-arrays.html.ini
@@ -2,4 +2,3 @@
type: testharness
expected:
if os == "mac": CRASH
- if not debug and (os == "mac") and (version == "OS X 10.10.5") and (processor == "x86_64") and (bits == 64) and (backend == "cpu"): CRASH
diff --git a/tests/wpt/metadata/workers/semantics/interface-objects/002.worker.js.ini b/tests/wpt/metadata/workers/semantics/interface-objects/002.worker.js.ini
deleted file mode 100644
index d05ef098814..00000000000
--- a/tests/wpt/metadata/workers/semantics/interface-objects/002.worker.js.ini
+++ /dev/null
@@ -1,14 +0,0 @@
-[002.worker.html]
- type: testharness
- [The Location interface object should not be exposed.]
- expected: FAIL
-
- [The PopStateEvent interface object should not be exposed.]
- expected: FAIL
-
- [The HashChangeEvent interface object should not be exposed.]
- expected: FAIL
-
- [The PageTransitionEvent interface object should not be exposed.]
- expected: FAIL
-
diff --git a/tests/wpt/mozilla/tests/mozilla/interfaces.worker.js b/tests/wpt/mozilla/tests/mozilla/interfaces.worker.js
index eca4a7562b6..f91ed7c8bc5 100644
--- a/tests/wpt/mozilla/tests/mozilla/interfaces.worker.js
+++ b/tests/wpt/mozilla/tests/mozilla/interfaces.worker.js
@@ -7,7 +7,6 @@ importScripts("interfaces.js");
// IMPORTANT: Do not change the list below without review from a DOM peer!
test_interfaces([
- "BeforeUnloadEvent",
"Blob",
"CloseEvent",
"CSSStyleDeclaration",
@@ -30,21 +29,17 @@ test_interfaces([
"FileReader",
"FileReaderSync",
"FormData",
- "HashChangeEvent",
"Headers",
"History",
"ImageData",
- "Location",
"MediaError",
"MessageEvent",
"MimeType",
"MimeTypeArray",
- "PageTransitionEvent",
"Performance",
"PerformanceTiming",
"Plugin",
"PluginArray",
- "PopStateEvent",
"ProgressEvent",
"Request",
"Response",
diff --git a/tests/wpt/web-platform-tests/workers/semantics/interface-objects/002.worker.js b/tests/wpt/web-platform-tests/workers/semantics/interface-objects/002.worker.js
index 0f514988bd2..8fc0b6a46f9 100644
--- a/tests/wpt/web-platform-tests/workers/semantics/interface-objects/002.worker.js
+++ b/tests/wpt/web-platform-tests/workers/semantics/interface-objects/002.worker.js
@@ -16,6 +16,7 @@ var unexpected = [
"DrawingStyle",
"CanvasGradient",
"CanvasPattern",
+ "BeforeUnloadEvent",
"PopStateEvent",
"HashChangeEvent",
"PageTransitionEvent",