aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--components/constellation/constellation.rs10
-rw-r--r--components/constellation/pipeline.rs69
-rw-r--r--components/layout/display_list_builder.rs2
-rw-r--r--components/script/dom/bindings/error.rs4
-rw-r--r--components/script/dom/element.rs3
-rw-r--r--components/script/dom/htmllielement.rs25
-rw-r--r--components/script/dom/macros.rs16
-rw-r--r--components/script/dom/virtualmethods.rs4
-rw-r--r--components/script/dom/webidls/HTMLLIElement.webidl2
-rw-r--r--components/script/lib.rs1
-rw-r--r--components/script/script_runtime.rs8
-rw-r--r--components/style/attr.rs12
-rw-r--r--components/style/properties/gecko.mako.rs9
-rw-r--r--components/style/properties/longhand/background.mako.rs2
-rw-r--r--components/style/properties/longhand/box.mako.rs9
-rw-r--r--components/style/values.rs66
-rw-r--r--ports/geckolib/data.rs11
-rw-r--r--ports/geckolib/gecko_bindings/bindings.rs1
-rw-r--r--ports/geckolib/gecko_bindings/structs_debug.rs731
-rw-r--r--ports/geckolib/gecko_bindings/structs_release.rs731
-rw-r--r--ports/geckolib/gecko_bindings/sugar/ns_style_coord.rs64
-rwxr-xr-xports/geckolib/gecko_bindings/tools/regen.py2
-rw-r--r--ports/geckolib/glue.rs13
-rw-r--r--tests/unit/style/attr.rs18
-rw-r--r--tests/wpt/metadata/html/dom/interfaces.html.ini6
-rw-r--r--tests/wpt/metadata/html/dom/reflection-grouping.html.ini180
-rw-r--r--tests/wpt/metadata/html/semantics/grouping-content/the-li-element/grouping-li.html.ini30
27 files changed, 1038 insertions, 991 deletions
diff --git a/components/constellation/constellation.rs b/components/constellation/constellation.rs
index d2f045de0d1..2017f0b4b09 100644
--- a/components/constellation/constellation.rs
+++ b/components/constellation/constellation.rs
@@ -342,9 +342,8 @@ impl Log for FromScriptLogger {
let pipeline_id = PipelineId::installed();
let thread_name = thread::current().name().map(ToOwned::to_owned);
let msg = FromScriptMsg::LogEntry(pipeline_id, thread_name, entry);
- if let Ok(chan) = self.constellation_chan.lock() {
- let _ = chan.send(msg);
- }
+ let chan = self.constellation_chan.lock().unwrap_or_else(|err| err.into_inner());
+ let _ = chan.send(msg);
}
}
}
@@ -381,9 +380,8 @@ impl Log for FromCompositorLogger {
let pipeline_id = PipelineId::installed();
let thread_name = thread::current().name().map(ToOwned::to_owned);
let msg = FromCompositorMsg::LogEntry(pipeline_id, thread_name, entry);
- if let Ok(chan) = self.constellation_chan.lock() {
- let _ = chan.send(msg);
- }
+ let chan = self.constellation_chan.lock().unwrap_or_else(|err| err.into_inner());
+ let _ = chan.send(msg);
}
}
}
diff --git a/components/constellation/pipeline.rs b/components/constellation/pipeline.rs
index 70ec20cbdbd..a75d083db64 100644
--- a/components/constellation/pipeline.rs
+++ b/components/constellation/pipeline.rs
@@ -28,6 +28,8 @@ use script_traits::{ConstellationControlMsg, InitialScriptState, MozBrowserEvent
use script_traits::{LayoutControlMsg, LayoutMsg, NewLayoutInfo, ScriptMsg, SWManagerMsg, SWManagerSenders};
use script_traits::{ScriptThreadFactory, TimerEventRequest, WindowSizeData};
use std::collections::HashMap;
+use std::env;
+use std::ffi::OsStr;
use std::io::Error as IOError;
use std::process;
use std::sync::mpsc::{Sender, channel};
@@ -485,7 +487,18 @@ impl UnprivilegedPipelineContent {
use gaol::sandbox::{self, Sandbox, SandboxMethods};
use ipc_channel::ipc::IpcOneShotServer;
use sandboxing::content_process_sandbox_profile;
- use std::env;
+
+ impl CommandMethods for sandbox::Command {
+ fn arg<T>(&mut self, arg: T)
+ where T: AsRef<OsStr> {
+ self.arg(arg);
+ }
+
+ fn env<T, U>(&mut self, key: T, val: U)
+ where T: AsRef<OsStr>, U: AsRef<OsStr> {
+ self.env(key, val);
+ }
+ }
// Note that this function can panic, due to process creation,
// avoiding this panic would require a mechanism for dealing
@@ -497,15 +510,7 @@ impl UnprivilegedPipelineContent {
// If there is a sandbox, use the `gaol` API to create the child process.
let child_process = if opts::get().sandbox {
let mut command = sandbox::Command::me().expect("Failed to get current sandbox.");
- command.arg("--content-process").arg(token);
-
- if let Ok(value) = env::var("RUST_BACKTRACE") {
- command.env("RUST_BACKTRACE", value);
- }
-
- if let Ok(value) = env::var("RUST_LOG") {
- command.env("RUST_LOG", value);
- }
+ self.setup_common(&mut command, token);
let profile = content_process_sandbox_profile();
ChildProcess::Sandboxed(Sandbox::new(profile).start(&mut command)
@@ -514,16 +519,7 @@ impl UnprivilegedPipelineContent {
let path_to_self = env::current_exe()
.expect("Failed to get current executor.");
let mut child_process = process::Command::new(path_to_self);
- child_process.arg("--content-process");
- child_process.arg(token);
-
- if let Ok(value) = env::var("RUST_BACKTRACE") {
- child_process.env("RUST_BACKTRACE", value);
- }
-
- if let Ok(value) = env::var("RUST_LOG") {
- child_process.env("RUST_LOG", value);
- }
+ self.setup_common(&mut child_process, token);
ChildProcess::Unsandboxed(child_process.spawn()
.expect("Failed to start unsandboxed child process!"))
@@ -541,6 +537,19 @@ impl UnprivilegedPipelineContent {
process::exit(1);
}
+ fn setup_common<C: CommandMethods>(&self, command: &mut C, token: String) {
+ C::arg(command, "--content-process");
+ C::arg(command, token);
+
+ if let Ok(value) = env::var("RUST_BACKTRACE") {
+ C::env(command, "RUST_BACKTRACE", value);
+ }
+
+ if let Ok(value) = env::var("RUST_LOG") {
+ C::env(command, "RUST_LOG", value);
+ }
+ }
+
pub fn constellation_chan(&self) -> IpcSender<ScriptMsg> {
self.constellation_chan.clone()
}
@@ -560,3 +569,23 @@ impl UnprivilegedPipelineContent {
}
}
}
+
+trait CommandMethods {
+ fn arg<T>(&mut self, arg: T)
+ where T: AsRef<OsStr>;
+
+ fn env<T, U>(&mut self, key: T, val: U)
+ where T: AsRef<OsStr>, U: AsRef<OsStr>;
+}
+
+impl CommandMethods for process::Command {
+ fn arg<T>(&mut self, arg: T)
+ where T: AsRef<OsStr> {
+ self.arg(arg);
+ }
+
+ fn env<T, U>(&mut self, key: T, val: U)
+ where T: AsRef<OsStr>, U: AsRef<OsStr> {
+ self.env(key, val);
+ }
+}
diff --git a/components/layout/display_list_builder.rs b/components/layout/display_list_builder.rs
index 8d036dfc90e..58ff6d23e44 100644
--- a/components/layout/display_list_builder.rs
+++ b/components/layout/display_list_builder.rs
@@ -398,7 +398,7 @@ impl FragmentDisplayListBuilding for Fragment {
gradient,
style);
}
- Some(computed::Image::Url(ref image_url)) => {
+ Some(computed::Image::Url(ref image_url, ref _extra_data)) => {
self.build_display_list_for_background_image(state,
style,
display_list_section,
diff --git a/components/script/dom/bindings/error.rs b/components/script/dom/bindings/error.rs
index bd63ba84fb1..c4bda97e521 100644
--- a/components/script/dom/bindings/error.rs
+++ b/components/script/dom/bindings/error.rs
@@ -178,7 +178,7 @@ impl ErrorInfo {
})
}
- fn from_dom_exception(cx: *mut JSContext, object: HandleObject) -> Option<ErrorInfo> {
+ fn from_dom_exception(object: HandleObject) -> Option<ErrorInfo> {
let exception = match root_from_object::<DOMException>(object.get()) {
Ok(exception) => exception,
Err(_) => return None,
@@ -215,7 +215,7 @@ pub unsafe fn report_pending_exception(cx: *mut JSContext, obj: *mut JSObject) {
rooted!(in(cx) let object = value.to_object());
let error_info = ErrorInfo::from_native_error(cx, object.handle())
- .or_else(|| ErrorInfo::from_dom_exception(cx, object.handle()));
+ .or_else(|| ErrorInfo::from_dom_exception(object.handle()));
let error_info = match error_info {
Some(error_info) => error_info,
None => {
diff --git a/components/script/dom/element.rs b/components/script/dom/element.rs
index a4c1ed28583..ae3c31d151c 100644
--- a/components/script/dom/element.rs
+++ b/components/script/dom/element.rs
@@ -347,7 +347,8 @@ impl LayoutElementHelpers for LayoutJS<Element> {
if let Some(url) = background {
hints.push(from_declaration(
PropertyDeclaration::BackgroundImage(DeclaredValue::Value(
- background_image::SpecifiedValue(Some(specified::Image::Url(url)))))));
+ background_image::SpecifiedValue(Some(
+ specified::Image::Url(url, specified::UrlExtraData { })))))));
}
let color = if let Some(this) = self.downcast::<HTMLFontElement>() {
diff --git a/components/script/dom/htmllielement.rs b/components/script/dom/htmllielement.rs
index 444fc37827c..32915a5c351 100644
--- a/components/script/dom/htmllielement.rs
+++ b/components/script/dom/htmllielement.rs
@@ -3,12 +3,16 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use dom::bindings::codegen::Bindings::HTMLLIElementBinding;
+use dom::bindings::codegen::Bindings::HTMLLIElementBinding::HTMLLIElementMethods;
+use dom::bindings::inheritance::Castable;
use dom::bindings::js::Root;
use dom::bindings::str::DOMString;
use dom::document::Document;
use dom::htmlelement::HTMLElement;
use dom::node::Node;
+use dom::virtualmethods::VirtualMethods;
use string_cache::Atom;
+use style::attr::AttrValue;
#[dom_struct]
pub struct HTMLLIElement {
@@ -31,3 +35,24 @@ impl HTMLLIElement {
HTMLLIElementBinding::Wrap)
}
}
+
+impl HTMLLIElementMethods for HTMLLIElement {
+ // https://html.spec.whatwg.org/multipage/#dom-li-value
+ make_int_getter!(Value, "value");
+
+ // https://html.spec.whatwg.org/multipage/#dom-li-value
+ make_int_setter!(SetValue, "value");
+}
+
+impl VirtualMethods for HTMLLIElement {
+ fn super_type(&self) -> Option<&VirtualMethods> {
+ Some(self.upcast::<HTMLElement>() as &VirtualMethods)
+ }
+
+ fn parse_plain_attribute(&self, name: &Atom, value: DOMString) -> AttrValue {
+ match name {
+ &atom!("value") => AttrValue::from_i32(value.into(), 0),
+ _ => self.super_type().unwrap().parse_plain_attribute(name, value),
+ }
+ }
+}
diff --git a/components/script/dom/macros.rs b/components/script/dom/macros.rs
index 58af2b28ac6..2b29ec8014c 100644
--- a/components/script/dom/macros.rs
+++ b/components/script/dom/macros.rs
@@ -47,6 +47,22 @@ macro_rules! make_limited_int_setter(
);
#[macro_export]
+macro_rules! make_int_setter(
+ ($attr:ident, $htmlname:tt, $default:expr) => (
+ fn $attr(&self, value: i32) {
+ use dom::bindings::inheritance::Castable;
+ use dom::element::Element;
+
+ let element = self.upcast::<Element>();
+ element.set_int_attribute(&atom!($htmlname), value)
+ }
+ );
+ ($attr:ident, $htmlname:tt) => {
+ make_int_setter!($attr, $htmlname, 0);
+ };
+);
+
+#[macro_export]
macro_rules! make_int_getter(
($attr:ident, $htmlname:tt, $default:expr) => (
fn $attr(&self) -> i32 {
diff --git a/components/script/dom/virtualmethods.rs b/components/script/dom/virtualmethods.rs
index b42e8b676c3..d4cf1609568 100644
--- a/components/script/dom/virtualmethods.rs
+++ b/components/script/dom/virtualmethods.rs
@@ -29,6 +29,7 @@ use dom::htmliframeelement::HTMLIFrameElement;
use dom::htmlimageelement::HTMLImageElement;
use dom::htmlinputelement::HTMLInputElement;
use dom::htmllabelelement::HTMLLabelElement;
+use dom::htmllielement::HTMLLIElement;
use dom::htmllinkelement::HTMLLinkElement;
use dom::htmlmediaelement::HTMLMediaElement;
use dom::htmlmetaelement::HTMLMetaElement;
@@ -179,6 +180,9 @@ pub fn vtable_for(node: &Node) -> &VirtualMethods {
NodeTypeId::Element(ElementTypeId::HTMLElement(HTMLElementTypeId::HTMLLabelElement)) => {
node.downcast::<HTMLLabelElement>().unwrap() as &VirtualMethods
}
+ NodeTypeId::Element(ElementTypeId::HTMLElement(HTMLElementTypeId::HTMLLIElement)) => {
+ node.downcast::<HTMLLIElement>().unwrap() as &VirtualMethods
+ }
NodeTypeId::Element(ElementTypeId::HTMLElement(HTMLElementTypeId::HTMLLinkElement)) => {
node.downcast::<HTMLLinkElement>().unwrap() as &VirtualMethods
}
diff --git a/components/script/dom/webidls/HTMLLIElement.webidl b/components/script/dom/webidls/HTMLLIElement.webidl
index a2fcd9cc7d3..ea7d574eba4 100644
--- a/components/script/dom/webidls/HTMLLIElement.webidl
+++ b/components/script/dom/webidls/HTMLLIElement.webidl
@@ -4,7 +4,7 @@
// https://html.spec.whatwg.org/multipage/#htmllielement
interface HTMLLIElement : HTMLElement {
- // attribute long value;
+ attribute long value;
// also has obsolete members
};
diff --git a/components/script/lib.rs b/components/script/lib.rs
index 5b16377fe68..20eb3336a38 100644
--- a/components/script/lib.rs
+++ b/components/script/lib.rs
@@ -10,7 +10,6 @@
#![feature(custom_attribute)]
#![feature(custom_derive)]
#![feature(fnbox)]
-#![feature(iter_arith)]
#![feature(mpsc_select)]
#![feature(nonzero)]
#![feature(on_unimplemented)]
diff --git a/components/script/script_runtime.rs b/components/script/script_runtime.rs
index d07491d8ce8..dfbb5ba5203 100644
--- a/components/script/script_runtime.rs
+++ b/components/script/script_runtime.rs
@@ -120,7 +120,7 @@ pub unsafe fn new_rt_and_cx() -> Runtime {
// Pre barriers aren't working correctly at the moment
DisableIncrementalGC(runtime.rt());
- set_gc_zeal_options(runtime.cx());
+ set_gc_zeal_options(runtime.rt());
// Enable or disable the JITs.
let rt_opts = &mut *RuntimeOptionsRef(runtime.rt());
@@ -400,7 +400,7 @@ unsafe extern fn trace_rust_roots(tr: *mut JSTracer, _data: *mut os::raw::c_void
#[allow(unsafe_code)]
#[cfg(feature = "debugmozjs")]
-unsafe fn set_gc_zeal_options(cx: *mut JSContext) {
+unsafe fn set_gc_zeal_options(rt: *mut JSRuntime) {
use js::jsapi::{JS_DEFAULT_ZEAL_FREQ, JS_SetGCZeal};
let level = match PREFS.get("js.mem.gc.zeal.level").as_i64() {
@@ -411,9 +411,9 @@ unsafe fn set_gc_zeal_options(cx: *mut JSContext) {
Some(frequency) if frequency >= 0 => frequency as u32,
_ => JS_DEFAULT_ZEAL_FREQ,
};
- JS_SetGCZeal(cx, level, frequency);
+ JS_SetGCZeal(rt, level, frequency);
}
#[allow(unsafe_code)]
#[cfg(not(feature = "debugmozjs"))]
-unsafe fn set_gc_zeal_options(_: *mut JSContext) {}
+unsafe fn set_gc_zeal_options(_: *mut JSRuntime) {}
diff --git a/components/style/attr.rs b/components/style/attr.rs
index af7cfa015f6..fc741d61575 100644
--- a/components/style/attr.rs
+++ b/components/style/attr.rs
@@ -92,17 +92,17 @@ pub fn parse_double(string: &str) -> Result<f64, ()> {
let trimmed = string.trim_matches(HTML_SPACE_CHARACTERS);
let mut input = trimmed.chars().peekable();
- let (value, divisor) = match input.peek() {
+ let (value, divisor, chars_skipped) = match input.peek() {
None => return Err(()),
Some(&'-') => {
input.next();
- (-1f64, -1f64)
+ (-1f64, -1f64, 1)
}
Some(&'+') => {
input.next();
- (1f64, 1f64)
+ (1f64, 1f64, 1)
}
- _ => (1f64, 1f64)
+ _ => (1f64, 1f64, 0)
};
let (value, value_digits) = if let Some(&'.') = input.peek() {
@@ -112,11 +112,11 @@ pub fn parse_double(string: &str) -> Result<f64, ()> {
(value * read_val.and_then(|result| result.to_f64()).unwrap_or(1f64), read_digits)
};
- let input = trimmed.chars().skip(value_digits).peekable();
+ let input = trimmed.chars().skip(value_digits + chars_skipped).peekable();
let (mut value, fraction_digits) = read_fraction(input, divisor, value);
- let input = trimmed.chars().skip(value_digits + fraction_digits).peekable();
+ let input = trimmed.chars().skip(value_digits + chars_skipped + fraction_digits).peekable();
if let Some(exp) = read_exponent(input) {
value *= 10f64.powi(exp)
diff --git a/components/style/properties/gecko.mako.rs b/components/style/properties/gecko.mako.rs
index 56aa317d5ee..074e4e08579 100644
--- a/components/style/properties/gecko.mako.rs
+++ b/components/style/properties/gecko.mako.rs
@@ -661,9 +661,10 @@ fn static_assert() {
use gecko_bindings::structs::nsStyleUnit;
// z-index is never a calc(). If it were, we'd be leaking here, so
// assert that it isn't.
- debug_assert!(self.gecko.mZIndex.mUnit != nsStyleUnit::eStyleUnit_Calc);
- self.gecko.mZIndex.mUnit = other.gecko.mZIndex.mUnit;
- self.gecko.mZIndex.mValue = other.gecko.mZIndex.mValue;
+ debug_assert!(self.gecko.mZIndex.unit() != nsStyleUnit::eStyleUnit_Calc);
+ unsafe {
+ self.gecko.mZIndex.copy_from_unchecked(&other.gecko.mZIndex);
+ }
}
pub fn clone_z_index(&self) -> longhands::z_index::computed_value::T {
@@ -1097,7 +1098,7 @@ fn static_assert() {
Gecko_SetGradientImageValue(&mut geckoimage.mImage, gecko_gradient);
}
},
- Image::Url(_) => {
+ Image::Url(..) => {
// let utf8_bytes = url.as_bytes();
// Gecko_SetUrlImageValue(&mut self.gecko.mImage.mLayers.mFirstElement,
// utf8_bytes.as_ptr() as *const _,
diff --git a/components/style/properties/longhand/background.mako.rs b/components/style/properties/longhand/background.mako.rs
index f5708c5ede8..501a98fd7fa 100644
--- a/components/style/properties/longhand/background.mako.rs
+++ b/components/style/properties/longhand/background.mako.rs
@@ -28,7 +28,7 @@ ${helpers.predefined_type("background-color", "CSSColor",
fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
match self.0 {
None => dest.write_str("none"),
- Some(computed::Image::Url(ref url)) => url.to_css(dest),
+ Some(computed::Image::Url(ref url, ref _extra_data)) => url.to_css(dest),
Some(computed::Image::LinearGradient(ref gradient)) =>
gradient.to_css(dest)
}
diff --git a/components/style/properties/longhand/box.mako.rs b/components/style/properties/longhand/box.mako.rs
index 87af34df33e..a00f0c01393 100644
--- a/components/style/properties/longhand/box.mako.rs
+++ b/components/style/properties/longhand/box.mako.rs
@@ -914,19 +914,12 @@ ${helpers.single_keyword("-moz-appearance",
use gecko_bindings::ptr::{GeckoArcPrincipal, GeckoArcURI};
use std::fmt::{self, Write};
use url::Url;
+ use values::specified::UrlExtraData;
use values::computed::ComputedValueAsSpecified;
use values::NoViewportPercentage;
#[derive(PartialEq, Clone, Debug)]
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
- pub struct UrlExtraData {
- pub base: GeckoArcURI,
- pub referrer: GeckoArcURI,
- pub principal: GeckoArcPrincipal,
- }
-
- #[derive(PartialEq, Clone, Debug)]
- #[cfg_attr(feature = "servo", derive(HeapSizeOf))]
pub enum SpecifiedValue {
Url(Url, UrlExtraData),
None,
diff --git a/components/style/values.rs b/components/style/values.rs
index 35063977aa6..f3e7682de08 100644
--- a/components/style/values.rs
+++ b/components/style/values.rs
@@ -98,7 +98,9 @@ pub mod specified {
use app_units::Au;
use cssparser::{self, Parser, ToCss, Token};
use euclid::size::Size2D;
- use parser::ParserContext;
+ #[cfg(feature = "gecko")]
+ use gecko_bindings::ptr::{GeckoArcPrincipal, GeckoArcURI};
+ use parser::{ParserContext, ParserContextExtraData};
use std::ascii::AsciiExt;
use std::cmp;
use std::f32::consts::PI;
@@ -1317,11 +1319,47 @@ pub mod specified {
}
}
+ #[derive(PartialEq, Clone, Debug)]
+ #[cfg_attr(feature = "servo", derive(HeapSizeOf))]
+ pub struct UrlExtraData {
+ #[cfg(feature = "gecko")]
+ pub base: GeckoArcURI,
+ #[cfg(feature = "gecko")]
+ pub referrer: GeckoArcURI,
+ #[cfg(feature = "gecko")]
+ pub principal: GeckoArcPrincipal,
+ }
+
+ impl UrlExtraData {
+ #[cfg(feature = "servo")]
+ pub fn make_from(content: &ParserContext) -> Option<UrlExtraData> {
+ Some(UrlExtraData { })
+ }
+
+ #[cfg(feature = "gecko")]
+ pub fn make_from(context: &ParserContext) -> Option<UrlExtraData> {
+ match context.extra_data {
+ ParserContextExtraData {
+ base: Some(ref base),
+ referrer: Some(ref referrer),
+ principal: Some(ref principal),
+ } => {
+ Some(UrlExtraData {
+ base: base.clone(),
+ referrer: referrer.clone(),
+ principal: principal.clone(),
+ })
+ },
+ _ => None,
+ }
+ }
+ }
+
/// Specified values for an image according to CSS-IMAGES.
#[derive(Clone, PartialEq, Debug)]
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
pub enum Image {
- Url(Url),
+ Url(Url, UrlExtraData),
LinearGradient(LinearGradient),
}
@@ -1329,7 +1367,7 @@ pub mod specified {
fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
use values::LocalToCss;
match *self {
- Image::Url(ref url) => {
+ Image::Url(ref url, ref _extra_data) => {
url.to_css(dest)
}
Image::LinearGradient(ref gradient) => gradient.to_css(dest)
@@ -1340,7 +1378,17 @@ pub mod specified {
impl Image {
pub fn parse(context: &ParserContext, input: &mut Parser) -> Result<Image, ()> {
if let Ok(url) = input.try(|input| input.expect_url()) {
- Ok(Image::Url(context.parse_url(&url)))
+ match UrlExtraData::make_from(context) {
+ Some(extra_data) => {
+ Ok(Image::Url(context.parse_url(&url), extra_data))
+ },
+ None => {
+ // FIXME(heycam) should ensure we always have a principal, etc., when
+ // parsing style attributes and re-parsing due to CSS Variables.
+ println!("stylo: skipping declaration without ParserContextExtraData");
+ Err(())
+ },
+ }
} else {
match_ignore_ascii_case! { try!(input.expect_function()),
"linear-gradient" => {
@@ -1664,7 +1712,7 @@ pub mod computed {
use super::{CSSFloat, specified};
use url::Url;
pub use cssparser::Color as CSSColor;
- pub use super::specified::{Angle, BorderStyle, Time};
+ pub use super::specified::{Angle, BorderStyle, Time, UrlExtraData};
pub struct Context<'a> {
pub is_root_element: bool,
@@ -2164,7 +2212,9 @@ pub mod computed {
#[inline]
fn to_computed_value(&self, context: &Context) -> Image {
match *self {
- specified::Image::Url(ref url) => Image::Url(url.clone()),
+ specified::Image::Url(ref url, ref extra_data) => {
+ Image::Url(url.clone(), extra_data.clone())
+ },
specified::Image::LinearGradient(ref linear_gradient) => {
Image::LinearGradient(linear_gradient.to_computed_value(context))
}
@@ -2177,14 +2227,14 @@ pub mod computed {
#[derive(Clone, PartialEq)]
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
pub enum Image {
- Url(Url),
+ Url(Url, UrlExtraData),
LinearGradient(LinearGradient),
}
impl fmt::Debug for Image {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
- Image::Url(ref url) => write!(f, "url(\"{}\")", url),
+ Image::Url(ref url, ref _extra_data) => write!(f, "url(\"{}\")", url),
Image::LinearGradient(ref grad) => write!(f, "linear-gradient({:?})", grad),
}
}
diff --git a/ports/geckolib/data.rs b/ports/geckolib/data.rs
index 8e0b98b4266..be287d66a98 100644
--- a/ports/geckolib/data.rs
+++ b/ports/geckolib/data.rs
@@ -77,6 +77,17 @@ impl PerDocumentStyleData {
pub fn borrow_mut_from_raw<'a>(data: *mut RawServoStyleSet) -> &'a mut Self {
unsafe { &mut *(data as *mut PerDocumentStyleData) }
}
+
+ pub fn flush_stylesheets(&mut self) {
+ // The stylist wants to be flushed if either the stylesheets change or the
+ // device dimensions change. When we add support for media queries, we'll
+ // need to detect the latter case and trigger a flush as well.
+ if self.stylesheets_changed {
+ let _ = Arc::get_mut(&mut self.stylist).unwrap()
+ .update(&self.stylesheets, true);
+ self.stylesheets_changed = false;
+ }
+ }
}
impl Drop for PerDocumentStyleData {
diff --git a/ports/geckolib/gecko_bindings/bindings.rs b/ports/geckolib/gecko_bindings/bindings.rs
index 9dd1a4e0b00..e659a17c43c 100644
--- a/ports/geckolib/gecko_bindings/bindings.rs
+++ b/ports/geckolib/gecko_bindings/bindings.rs
@@ -370,7 +370,6 @@ extern "C" {
set: *mut RawServoStyleSet);
pub fn Servo_RestyleSubtree(node: *mut RawGeckoNode,
set: *mut RawServoStyleSet);
- pub fn Servo_StyleWorkerThreadCount() -> u32;
pub fn Servo_ComputeRestyleHint(element: *mut RawGeckoElement,
snapshot: *mut ServoElementSnapshot,
set: *mut RawServoStyleSet)
diff --git a/ports/geckolib/gecko_bindings/structs_debug.rs b/ports/geckolib/gecko_bindings/structs_debug.rs
index 4b5ab65726f..1ac5b06026e 100644
--- a/ports/geckolib/gecko_bindings/structs_debug.rs
+++ b/ports/geckolib/gecko_bindings/structs_debug.rs
@@ -347,6 +347,7 @@ pub const NS_STYLE_BORDER_STYLE_AUTO: ::std::os::raw::c_uint = 10;
pub const NS_STYLE_BORDER_IMAGE_REPEAT_STRETCH: ::std::os::raw::c_uint = 0;
pub const NS_STYLE_BORDER_IMAGE_REPEAT_REPEAT: ::std::os::raw::c_uint = 1;
pub const NS_STYLE_BORDER_IMAGE_REPEAT_ROUND: ::std::os::raw::c_uint = 2;
+pub const NS_STYLE_BORDER_IMAGE_REPEAT_SPACE: ::std::os::raw::c_uint = 3;
pub const NS_STYLE_BORDER_IMAGE_SLICE_NOFILL: ::std::os::raw::c_uint = 0;
pub const NS_STYLE_BORDER_IMAGE_SLICE_FILL: ::std::os::raw::c_uint = 1;
pub const NS_STYLE_CLEAR_NONE: ::std::os::raw::c_uint = 0;
@@ -1891,6 +1892,34 @@ fn bindgen_test_layout_NS_ConvertUTF8toUTF16() {
assert_eq!(::std::mem::align_of::<NS_ConvertUTF8toUTF16>() , 8usize);
}
pub type nsVoidableString = nsAutoString;
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct RefPtrTraits<U> {
+ pub _phantom0: ::std::marker::PhantomData<U>,
+}
+#[repr(C)]
+#[derive(Debug)]
+pub struct RefPtr<T> {
+ pub mRawPtr: *mut T,
+}
+#[repr(C)]
+#[derive(Debug)]
+pub struct RefPtr_Proxy<T, R, Args> {
+ pub mRawPtr: *mut T,
+ pub _phantom0: ::std::marker::PhantomData<R>,
+ pub _phantom1: ::std::marker::PhantomData<Args>,
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct RefPtr_ConstRemovingRefPtrTraits<T, U> {
+ pub _phantom0: ::std::marker::PhantomData<T>,
+ pub _phantom1: ::std::marker::PhantomData<U>,
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct RefPtrGetterAddRefs<T> {
+ pub mTargetSmartPtr: *mut RefPtr<T>,
+}
/**
* A "unique identifier". This is modeled after OSF DCE UUIDs.
*/
@@ -2047,34 +2076,6 @@ fn bindgen_test_layout_QITableEntry() {
assert_eq!(::std::mem::size_of::<QITableEntry>() , 16usize);
assert_eq!(::std::mem::align_of::<QITableEntry>() , 8usize);
}
-#[repr(C)]
-#[derive(Debug, Copy, Clone)]
-pub struct RefPtrTraits<U> {
- pub _phantom0: ::std::marker::PhantomData<U>,
-}
-#[repr(C)]
-#[derive(Debug)]
-pub struct RefPtr<T> {
- pub mRawPtr: *mut T,
-}
-#[repr(C)]
-#[derive(Debug)]
-pub struct RefPtr_Proxy<T, R, Args> {
- pub mRawPtr: *mut T,
- pub _phantom0: ::std::marker::PhantomData<R>,
- pub _phantom1: ::std::marker::PhantomData<Args>,
-}
-#[repr(C)]
-#[derive(Debug, Copy, Clone)]
-pub struct RefPtr_ConstRemovingRefPtrTraits<T, U> {
- pub _phantom0: ::std::marker::PhantomData<T>,
- pub _phantom1: ::std::marker::PhantomData<U>,
-}
-#[repr(C)]
-#[derive(Debug, Copy, Clone)]
-pub struct RefPtrGetterAddRefs<T> {
- pub mTargetSmartPtr: *mut RefPtr<T>,
-}
pub enum TileClient { }
#[repr(C)]
#[derive(Debug, Copy)]
@@ -2817,6 +2818,11 @@ pub enum nsNodeSupportsWeakRefTearoff { }
pub enum nsNodeWeakReference { }
pub enum nsDOMMutationObserver { }
pub enum ServoNodeData { }
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct DefaultDelete<> {
+ pub _phantom0: ::std::marker::PhantomData<ServoNodeData>,
+}
pub enum EventListenerManager { }
pub enum BoxQuadOptions { }
pub enum ConvertCoordinateOptions { }
@@ -4077,305 +4083,306 @@ pub enum nsCSSProperty {
eCSSProperty_grid_template_rows = 141,
eCSSProperty_height = 142,
eCSSProperty_hyphens = 143,
- eCSSProperty_image_orientation = 144,
- eCSSProperty_image_region = 145,
- eCSSProperty_image_rendering = 146,
- eCSSProperty_ime_mode = 147,
- eCSSProperty_inline_size = 148,
- eCSSProperty_isolation = 149,
- eCSSProperty_justify_content = 150,
- eCSSProperty_justify_items = 151,
- eCSSProperty_justify_self = 152,
- eCSSProperty__x_lang = 153,
- eCSSProperty_left = 154,
- eCSSProperty_letter_spacing = 155,
- eCSSProperty_lighting_color = 156,
- eCSSProperty_line_height = 157,
- eCSSProperty_list_style_image = 158,
- eCSSProperty_list_style_position = 159,
- eCSSProperty_list_style_type = 160,
- eCSSProperty_margin_block_end = 161,
- eCSSProperty_margin_block_start = 162,
- eCSSProperty_margin_bottom = 163,
- eCSSProperty_margin_inline_end = 164,
- eCSSProperty_margin_inline_start = 165,
- eCSSProperty_margin_left = 166,
- eCSSProperty_margin_right = 167,
- eCSSProperty_margin_top = 168,
- eCSSProperty_marker_end = 169,
- eCSSProperty_marker_mid = 170,
- eCSSProperty_marker_offset = 171,
- eCSSProperty_marker_start = 172,
- eCSSProperty_mask = 173,
- eCSSProperty_mask_type = 174,
- eCSSProperty_math_display = 175,
- eCSSProperty_math_variant = 176,
- eCSSProperty_max_block_size = 177,
- eCSSProperty_max_height = 178,
- eCSSProperty_max_inline_size = 179,
- eCSSProperty_max_width = 180,
- eCSSProperty_min_block_size = 181,
- eCSSProperty__moz_min_font_size_ratio = 182,
- eCSSProperty_min_height = 183,
- eCSSProperty_min_inline_size = 184,
- eCSSProperty_min_width = 185,
- eCSSProperty_mix_blend_mode = 186,
- eCSSProperty_object_fit = 187,
- eCSSProperty_object_position = 188,
- eCSSProperty_offset_block_end = 189,
- eCSSProperty_offset_block_start = 190,
- eCSSProperty_offset_inline_end = 191,
- eCSSProperty_offset_inline_start = 192,
- eCSSProperty_opacity = 193,
- eCSSProperty_order = 194,
- eCSSProperty_orient = 195,
- eCSSProperty_osx_font_smoothing = 196,
- eCSSProperty_outline_color = 197,
- eCSSProperty_outline_offset = 198,
- eCSSProperty__moz_outline_radius_bottomLeft = 199,
- eCSSProperty__moz_outline_radius_bottomRight = 200,
- eCSSProperty__moz_outline_radius_topLeft = 201,
- eCSSProperty__moz_outline_radius_topRight = 202,
- eCSSProperty_outline_style = 203,
- eCSSProperty_outline_width = 204,
- eCSSProperty_overflow_clip_box = 205,
- eCSSProperty_overflow_x = 206,
- eCSSProperty_overflow_y = 207,
- eCSSProperty_padding_block_end = 208,
- eCSSProperty_padding_block_start = 209,
- eCSSProperty_padding_bottom = 210,
- eCSSProperty_padding_inline_end = 211,
- eCSSProperty_padding_inline_start = 212,
- eCSSProperty_padding_left = 213,
- eCSSProperty_padding_right = 214,
- eCSSProperty_padding_top = 215,
- eCSSProperty_page_break_after = 216,
- eCSSProperty_page_break_before = 217,
- eCSSProperty_page_break_inside = 218,
- eCSSProperty_paint_order = 219,
- eCSSProperty_perspective = 220,
- eCSSProperty_perspective_origin = 221,
- eCSSProperty_pointer_events = 222,
- eCSSProperty_position = 223,
- eCSSProperty_quotes = 224,
- eCSSProperty_resize = 225,
- eCSSProperty_right = 226,
- eCSSProperty_ruby_align = 227,
- eCSSProperty_ruby_position = 228,
- eCSSProperty_script_level = 229,
- eCSSProperty_script_min_size = 230,
- eCSSProperty_script_size_multiplier = 231,
- eCSSProperty_scroll_behavior = 232,
- eCSSProperty_scroll_snap_coordinate = 233,
- eCSSProperty_scroll_snap_destination = 234,
- eCSSProperty_scroll_snap_points_x = 235,
- eCSSProperty_scroll_snap_points_y = 236,
- eCSSProperty_scroll_snap_type_x = 237,
- eCSSProperty_scroll_snap_type_y = 238,
- eCSSProperty_shape_rendering = 239,
- eCSSProperty__x_span = 240,
- eCSSProperty_stack_sizing = 241,
- eCSSProperty_stop_color = 242,
- eCSSProperty_stop_opacity = 243,
- eCSSProperty_stroke = 244,
- eCSSProperty_stroke_dasharray = 245,
- eCSSProperty_stroke_dashoffset = 246,
- eCSSProperty_stroke_linecap = 247,
- eCSSProperty_stroke_linejoin = 248,
- eCSSProperty_stroke_miterlimit = 249,
- eCSSProperty_stroke_opacity = 250,
- eCSSProperty_stroke_width = 251,
- eCSSProperty__x_system_font = 252,
- eCSSProperty__moz_tab_size = 253,
- eCSSProperty_table_layout = 254,
- eCSSProperty_text_align = 255,
- eCSSProperty_text_align_last = 256,
- eCSSProperty_text_anchor = 257,
- eCSSProperty_text_combine_upright = 258,
- eCSSProperty_text_decoration_color = 259,
- eCSSProperty_text_decoration_line = 260,
- eCSSProperty_text_decoration_style = 261,
- eCSSProperty_text_emphasis_color = 262,
- eCSSProperty_text_emphasis_position = 263,
- eCSSProperty_text_emphasis_style = 264,
- eCSSProperty__webkit_text_fill_color = 265,
- eCSSProperty_text_indent = 266,
- eCSSProperty_text_orientation = 267,
- eCSSProperty_text_overflow = 268,
- eCSSProperty_text_rendering = 269,
- eCSSProperty_text_shadow = 270,
- eCSSProperty_text_size_adjust = 271,
- eCSSProperty__webkit_text_stroke_color = 272,
- eCSSProperty__webkit_text_stroke_width = 273,
- eCSSProperty_text_transform = 274,
- eCSSProperty__x_text_zoom = 275,
- eCSSProperty_top = 276,
- eCSSProperty__moz_top_layer = 277,
- eCSSProperty_touch_action = 278,
- eCSSProperty_transform = 279,
- eCSSProperty_transform_box = 280,
- eCSSProperty_transform_origin = 281,
- eCSSProperty_transform_style = 282,
- eCSSProperty_transition_delay = 283,
- eCSSProperty_transition_duration = 284,
- eCSSProperty_transition_property = 285,
- eCSSProperty_transition_timing_function = 286,
- eCSSProperty_unicode_bidi = 287,
- eCSSProperty_user_focus = 288,
- eCSSProperty_user_input = 289,
- eCSSProperty_user_modify = 290,
- eCSSProperty_user_select = 291,
- eCSSProperty_vector_effect = 292,
- eCSSProperty_vertical_align = 293,
- eCSSProperty_visibility = 294,
- eCSSProperty_white_space = 295,
- eCSSProperty_width = 296,
- eCSSProperty_will_change = 297,
- eCSSProperty__moz_window_dragging = 298,
- eCSSProperty__moz_window_shadow = 299,
- eCSSProperty_word_break = 300,
- eCSSProperty_word_spacing = 301,
- eCSSProperty_overflow_wrap = 302,
- eCSSProperty_writing_mode = 303,
- eCSSProperty_z_index = 304,
- eCSSProperty_COUNT_no_shorthands = 305,
- eCSSProperty_animation = 306,
- eCSSProperty_background = 307,
- eCSSProperty_background_position = 308,
- eCSSProperty_border = 309,
- eCSSProperty_border_block_end = 310,
- eCSSProperty_border_block_start = 311,
- eCSSProperty_border_bottom = 312,
- eCSSProperty_border_color = 313,
- eCSSProperty_border_image = 314,
- eCSSProperty_border_inline_end = 315,
- eCSSProperty_border_inline_start = 316,
- eCSSProperty_border_left = 317,
- eCSSProperty_border_radius = 318,
- eCSSProperty_border_right = 319,
- eCSSProperty_border_style = 320,
- eCSSProperty_border_top = 321,
- eCSSProperty_border_width = 322,
- eCSSProperty__moz_column_rule = 323,
- eCSSProperty__moz_columns = 324,
- eCSSProperty_flex = 325,
- eCSSProperty_flex_flow = 326,
- eCSSProperty_font = 327,
- eCSSProperty_font_variant = 328,
- eCSSProperty_grid = 329,
- eCSSProperty_grid_area = 330,
- eCSSProperty_grid_column = 331,
- eCSSProperty_grid_gap = 332,
- eCSSProperty_grid_row = 333,
- eCSSProperty_grid_template = 334,
- eCSSProperty_list_style = 335,
- eCSSProperty_margin = 336,
- eCSSProperty_marker = 337,
- eCSSProperty_outline = 338,
- eCSSProperty__moz_outline_radius = 339,
- eCSSProperty_overflow = 340,
- eCSSProperty_padding = 341,
- eCSSProperty_scroll_snap_type = 342,
- eCSSProperty_text_decoration = 343,
- eCSSProperty_text_emphasis = 344,
- eCSSProperty__webkit_text_stroke = 345,
- eCSSProperty__moz_transform = 346,
- eCSSProperty_transition = 347,
- eCSSProperty_COUNT = 348,
- eCSSPropertyAlias_MozTransformOrigin = 349,
- eCSSPropertyAlias_MozPerspectiveOrigin = 350,
- eCSSPropertyAlias_MozPerspective = 351,
- eCSSPropertyAlias_MozTransformStyle = 352,
- eCSSPropertyAlias_MozBackfaceVisibility = 353,
- eCSSPropertyAlias_MozBorderImage = 354,
- eCSSPropertyAlias_MozTransition = 355,
- eCSSPropertyAlias_MozTransitionDelay = 356,
- eCSSPropertyAlias_MozTransitionDuration = 357,
- eCSSPropertyAlias_MozTransitionProperty = 358,
- eCSSPropertyAlias_MozTransitionTimingFunction = 359,
- eCSSPropertyAlias_MozAnimation = 360,
- eCSSPropertyAlias_MozAnimationDelay = 361,
- eCSSPropertyAlias_MozAnimationDirection = 362,
- eCSSPropertyAlias_MozAnimationDuration = 363,
- eCSSPropertyAlias_MozAnimationFillMode = 364,
- eCSSPropertyAlias_MozAnimationIterationCount = 365,
- eCSSPropertyAlias_MozAnimationName = 366,
- eCSSPropertyAlias_MozAnimationPlayState = 367,
- eCSSPropertyAlias_MozAnimationTimingFunction = 368,
- eCSSPropertyAlias_MozBoxSizing = 369,
- eCSSPropertyAlias_MozFontFeatureSettings = 370,
- eCSSPropertyAlias_MozFontLanguageOverride = 371,
- eCSSPropertyAlias_MozPaddingEnd = 372,
- eCSSPropertyAlias_MozPaddingStart = 373,
- eCSSPropertyAlias_MozMarginEnd = 374,
- eCSSPropertyAlias_MozMarginStart = 375,
- eCSSPropertyAlias_MozBorderEnd = 376,
- eCSSPropertyAlias_MozBorderEndColor = 377,
- eCSSPropertyAlias_MozBorderEndStyle = 378,
- eCSSPropertyAlias_MozBorderEndWidth = 379,
- eCSSPropertyAlias_MozBorderStart = 380,
- eCSSPropertyAlias_MozBorderStartColor = 381,
- eCSSPropertyAlias_MozBorderStartStyle = 382,
- eCSSPropertyAlias_MozBorderStartWidth = 383,
- eCSSPropertyAlias_MozHyphens = 384,
- eCSSPropertyAlias_MozTextAlignLast = 385,
- eCSSPropertyAlias_WebkitAnimation = 386,
- eCSSPropertyAlias_WebkitAnimationDelay = 387,
- eCSSPropertyAlias_WebkitAnimationDirection = 388,
- eCSSPropertyAlias_WebkitAnimationDuration = 389,
- eCSSPropertyAlias_WebkitAnimationFillMode = 390,
- eCSSPropertyAlias_WebkitAnimationIterationCount = 391,
- eCSSPropertyAlias_WebkitAnimationName = 392,
- eCSSPropertyAlias_WebkitAnimationPlayState = 393,
- eCSSPropertyAlias_WebkitAnimationTimingFunction = 394,
- eCSSPropertyAlias_WebkitFilter = 395,
- eCSSPropertyAlias_WebkitTextSizeAdjust = 396,
- eCSSPropertyAlias_WebkitTransform = 397,
- eCSSPropertyAlias_WebkitTransformOrigin = 398,
- eCSSPropertyAlias_WebkitTransformStyle = 399,
- eCSSPropertyAlias_WebkitBackfaceVisibility = 400,
- eCSSPropertyAlias_WebkitPerspective = 401,
- eCSSPropertyAlias_WebkitPerspectiveOrigin = 402,
- eCSSPropertyAlias_WebkitTransition = 403,
- eCSSPropertyAlias_WebkitTransitionDelay = 404,
- eCSSPropertyAlias_WebkitTransitionDuration = 405,
- eCSSPropertyAlias_WebkitTransitionProperty = 406,
- eCSSPropertyAlias_WebkitTransitionTimingFunction = 407,
- eCSSPropertyAlias_WebkitBorderRadius = 408,
- eCSSPropertyAlias_WebkitBorderTopLeftRadius = 409,
- eCSSPropertyAlias_WebkitBorderTopRightRadius = 410,
- eCSSPropertyAlias_WebkitBorderBottomLeftRadius = 411,
- eCSSPropertyAlias_WebkitBorderBottomRightRadius = 412,
- eCSSPropertyAlias_WebkitBackgroundClip = 413,
- eCSSPropertyAlias_WebkitBackgroundOrigin = 414,
- eCSSPropertyAlias_WebkitBackgroundSize = 415,
- eCSSPropertyAlias_WebkitBorderImage = 416,
- eCSSPropertyAlias_WebkitBoxShadow = 417,
- eCSSPropertyAlias_WebkitBoxSizing = 418,
- eCSSPropertyAlias_WebkitBoxFlex = 419,
- eCSSPropertyAlias_WebkitBoxOrdinalGroup = 420,
- eCSSPropertyAlias_WebkitBoxOrient = 421,
- eCSSPropertyAlias_WebkitBoxDirection = 422,
- eCSSPropertyAlias_WebkitBoxAlign = 423,
- eCSSPropertyAlias_WebkitBoxPack = 424,
- eCSSPropertyAlias_WebkitFlexDirection = 425,
- eCSSPropertyAlias_WebkitFlexWrap = 426,
- eCSSPropertyAlias_WebkitFlexFlow = 427,
- eCSSPropertyAlias_WebkitOrder = 428,
- eCSSPropertyAlias_WebkitFlex = 429,
- eCSSPropertyAlias_WebkitFlexGrow = 430,
- eCSSPropertyAlias_WebkitFlexShrink = 431,
- eCSSPropertyAlias_WebkitFlexBasis = 432,
- eCSSPropertyAlias_WebkitJustifyContent = 433,
- eCSSPropertyAlias_WebkitAlignItems = 434,
- eCSSPropertyAlias_WebkitAlignSelf = 435,
- eCSSPropertyAlias_WebkitAlignContent = 436,
- eCSSPropertyAlias_WebkitUserSelect = 437,
- eCSSProperty_COUNT_with_aliases = 438,
- eCSSPropertyExtra_all_properties = 439,
- eCSSPropertyExtra_x_none_value = 440,
- eCSSPropertyExtra_x_auto_value = 441,
- eCSSPropertyExtra_variable = 442,
+ eCSSProperty_initial_letter = 144,
+ eCSSProperty_image_orientation = 145,
+ eCSSProperty_image_region = 146,
+ eCSSProperty_image_rendering = 147,
+ eCSSProperty_ime_mode = 148,
+ eCSSProperty_inline_size = 149,
+ eCSSProperty_isolation = 150,
+ eCSSProperty_justify_content = 151,
+ eCSSProperty_justify_items = 152,
+ eCSSProperty_justify_self = 153,
+ eCSSProperty__x_lang = 154,
+ eCSSProperty_left = 155,
+ eCSSProperty_letter_spacing = 156,
+ eCSSProperty_lighting_color = 157,
+ eCSSProperty_line_height = 158,
+ eCSSProperty_list_style_image = 159,
+ eCSSProperty_list_style_position = 160,
+ eCSSProperty_list_style_type = 161,
+ eCSSProperty_margin_block_end = 162,
+ eCSSProperty_margin_block_start = 163,
+ eCSSProperty_margin_bottom = 164,
+ eCSSProperty_margin_inline_end = 165,
+ eCSSProperty_margin_inline_start = 166,
+ eCSSProperty_margin_left = 167,
+ eCSSProperty_margin_right = 168,
+ eCSSProperty_margin_top = 169,
+ eCSSProperty_marker_end = 170,
+ eCSSProperty_marker_mid = 171,
+ eCSSProperty_marker_offset = 172,
+ eCSSProperty_marker_start = 173,
+ eCSSProperty_mask = 174,
+ eCSSProperty_mask_type = 175,
+ eCSSProperty_math_display = 176,
+ eCSSProperty_math_variant = 177,
+ eCSSProperty_max_block_size = 178,
+ eCSSProperty_max_height = 179,
+ eCSSProperty_max_inline_size = 180,
+ eCSSProperty_max_width = 181,
+ eCSSProperty_min_block_size = 182,
+ eCSSProperty__moz_min_font_size_ratio = 183,
+ eCSSProperty_min_height = 184,
+ eCSSProperty_min_inline_size = 185,
+ eCSSProperty_min_width = 186,
+ eCSSProperty_mix_blend_mode = 187,
+ eCSSProperty_object_fit = 188,
+ eCSSProperty_object_position = 189,
+ eCSSProperty_offset_block_end = 190,
+ eCSSProperty_offset_block_start = 191,
+ eCSSProperty_offset_inline_end = 192,
+ eCSSProperty_offset_inline_start = 193,
+ eCSSProperty_opacity = 194,
+ eCSSProperty_order = 195,
+ eCSSProperty_orient = 196,
+ eCSSProperty_osx_font_smoothing = 197,
+ eCSSProperty_outline_color = 198,
+ eCSSProperty_outline_offset = 199,
+ eCSSProperty__moz_outline_radius_bottomLeft = 200,
+ eCSSProperty__moz_outline_radius_bottomRight = 201,
+ eCSSProperty__moz_outline_radius_topLeft = 202,
+ eCSSProperty__moz_outline_radius_topRight = 203,
+ eCSSProperty_outline_style = 204,
+ eCSSProperty_outline_width = 205,
+ eCSSProperty_overflow_clip_box = 206,
+ eCSSProperty_overflow_x = 207,
+ eCSSProperty_overflow_y = 208,
+ eCSSProperty_padding_block_end = 209,
+ eCSSProperty_padding_block_start = 210,
+ eCSSProperty_padding_bottom = 211,
+ eCSSProperty_padding_inline_end = 212,
+ eCSSProperty_padding_inline_start = 213,
+ eCSSProperty_padding_left = 214,
+ eCSSProperty_padding_right = 215,
+ eCSSProperty_padding_top = 216,
+ eCSSProperty_page_break_after = 217,
+ eCSSProperty_page_break_before = 218,
+ eCSSProperty_page_break_inside = 219,
+ eCSSProperty_paint_order = 220,
+ eCSSProperty_perspective = 221,
+ eCSSProperty_perspective_origin = 222,
+ eCSSProperty_pointer_events = 223,
+ eCSSProperty_position = 224,
+ eCSSProperty_quotes = 225,
+ eCSSProperty_resize = 226,
+ eCSSProperty_right = 227,
+ eCSSProperty_ruby_align = 228,
+ eCSSProperty_ruby_position = 229,
+ eCSSProperty_script_level = 230,
+ eCSSProperty_script_min_size = 231,
+ eCSSProperty_script_size_multiplier = 232,
+ eCSSProperty_scroll_behavior = 233,
+ eCSSProperty_scroll_snap_coordinate = 234,
+ eCSSProperty_scroll_snap_destination = 235,
+ eCSSProperty_scroll_snap_points_x = 236,
+ eCSSProperty_scroll_snap_points_y = 237,
+ eCSSProperty_scroll_snap_type_x = 238,
+ eCSSProperty_scroll_snap_type_y = 239,
+ eCSSProperty_shape_rendering = 240,
+ eCSSProperty__x_span = 241,
+ eCSSProperty_stack_sizing = 242,
+ eCSSProperty_stop_color = 243,
+ eCSSProperty_stop_opacity = 244,
+ eCSSProperty_stroke = 245,
+ eCSSProperty_stroke_dasharray = 246,
+ eCSSProperty_stroke_dashoffset = 247,
+ eCSSProperty_stroke_linecap = 248,
+ eCSSProperty_stroke_linejoin = 249,
+ eCSSProperty_stroke_miterlimit = 250,
+ eCSSProperty_stroke_opacity = 251,
+ eCSSProperty_stroke_width = 252,
+ eCSSProperty__x_system_font = 253,
+ eCSSProperty__moz_tab_size = 254,
+ eCSSProperty_table_layout = 255,
+ eCSSProperty_text_align = 256,
+ eCSSProperty_text_align_last = 257,
+ eCSSProperty_text_anchor = 258,
+ eCSSProperty_text_combine_upright = 259,
+ eCSSProperty_text_decoration_color = 260,
+ eCSSProperty_text_decoration_line = 261,
+ eCSSProperty_text_decoration_style = 262,
+ eCSSProperty_text_emphasis_color = 263,
+ eCSSProperty_text_emphasis_position = 264,
+ eCSSProperty_text_emphasis_style = 265,
+ eCSSProperty__webkit_text_fill_color = 266,
+ eCSSProperty_text_indent = 267,
+ eCSSProperty_text_orientation = 268,
+ eCSSProperty_text_overflow = 269,
+ eCSSProperty_text_rendering = 270,
+ eCSSProperty_text_shadow = 271,
+ eCSSProperty_text_size_adjust = 272,
+ eCSSProperty__webkit_text_stroke_color = 273,
+ eCSSProperty__webkit_text_stroke_width = 274,
+ eCSSProperty_text_transform = 275,
+ eCSSProperty__x_text_zoom = 276,
+ eCSSProperty_top = 277,
+ eCSSProperty__moz_top_layer = 278,
+ eCSSProperty_touch_action = 279,
+ eCSSProperty_transform = 280,
+ eCSSProperty_transform_box = 281,
+ eCSSProperty_transform_origin = 282,
+ eCSSProperty_transform_style = 283,
+ eCSSProperty_transition_delay = 284,
+ eCSSProperty_transition_duration = 285,
+ eCSSProperty_transition_property = 286,
+ eCSSProperty_transition_timing_function = 287,
+ eCSSProperty_unicode_bidi = 288,
+ eCSSProperty_user_focus = 289,
+ eCSSProperty_user_input = 290,
+ eCSSProperty_user_modify = 291,
+ eCSSProperty_user_select = 292,
+ eCSSProperty_vector_effect = 293,
+ eCSSProperty_vertical_align = 294,
+ eCSSProperty_visibility = 295,
+ eCSSProperty_white_space = 296,
+ eCSSProperty_width = 297,
+ eCSSProperty_will_change = 298,
+ eCSSProperty__moz_window_dragging = 299,
+ eCSSProperty__moz_window_shadow = 300,
+ eCSSProperty_word_break = 301,
+ eCSSProperty_word_spacing = 302,
+ eCSSProperty_overflow_wrap = 303,
+ eCSSProperty_writing_mode = 304,
+ eCSSProperty_z_index = 305,
+ eCSSProperty_COUNT_no_shorthands = 306,
+ eCSSProperty_animation = 307,
+ eCSSProperty_background = 308,
+ eCSSProperty_background_position = 309,
+ eCSSProperty_border = 310,
+ eCSSProperty_border_block_end = 311,
+ eCSSProperty_border_block_start = 312,
+ eCSSProperty_border_bottom = 313,
+ eCSSProperty_border_color = 314,
+ eCSSProperty_border_image = 315,
+ eCSSProperty_border_inline_end = 316,
+ eCSSProperty_border_inline_start = 317,
+ eCSSProperty_border_left = 318,
+ eCSSProperty_border_radius = 319,
+ eCSSProperty_border_right = 320,
+ eCSSProperty_border_style = 321,
+ eCSSProperty_border_top = 322,
+ eCSSProperty_border_width = 323,
+ eCSSProperty__moz_column_rule = 324,
+ eCSSProperty__moz_columns = 325,
+ eCSSProperty_flex = 326,
+ eCSSProperty_flex_flow = 327,
+ eCSSProperty_font = 328,
+ eCSSProperty_font_variant = 329,
+ eCSSProperty_grid = 330,
+ eCSSProperty_grid_area = 331,
+ eCSSProperty_grid_column = 332,
+ eCSSProperty_grid_gap = 333,
+ eCSSProperty_grid_row = 334,
+ eCSSProperty_grid_template = 335,
+ eCSSProperty_list_style = 336,
+ eCSSProperty_margin = 337,
+ eCSSProperty_marker = 338,
+ eCSSProperty_outline = 339,
+ eCSSProperty__moz_outline_radius = 340,
+ eCSSProperty_overflow = 341,
+ eCSSProperty_padding = 342,
+ eCSSProperty_scroll_snap_type = 343,
+ eCSSProperty_text_decoration = 344,
+ eCSSProperty_text_emphasis = 345,
+ eCSSProperty__webkit_text_stroke = 346,
+ eCSSProperty__moz_transform = 347,
+ eCSSProperty_transition = 348,
+ eCSSProperty_COUNT = 349,
+ eCSSPropertyAlias_MozTransformOrigin = 350,
+ eCSSPropertyAlias_MozPerspectiveOrigin = 351,
+ eCSSPropertyAlias_MozPerspective = 352,
+ eCSSPropertyAlias_MozTransformStyle = 353,
+ eCSSPropertyAlias_MozBackfaceVisibility = 354,
+ eCSSPropertyAlias_MozBorderImage = 355,
+ eCSSPropertyAlias_MozTransition = 356,
+ eCSSPropertyAlias_MozTransitionDelay = 357,
+ eCSSPropertyAlias_MozTransitionDuration = 358,
+ eCSSPropertyAlias_MozTransitionProperty = 359,
+ eCSSPropertyAlias_MozTransitionTimingFunction = 360,
+ eCSSPropertyAlias_MozAnimation = 361,
+ eCSSPropertyAlias_MozAnimationDelay = 362,
+ eCSSPropertyAlias_MozAnimationDirection = 363,
+ eCSSPropertyAlias_MozAnimationDuration = 364,
+ eCSSPropertyAlias_MozAnimationFillMode = 365,
+ eCSSPropertyAlias_MozAnimationIterationCount = 366,
+ eCSSPropertyAlias_MozAnimationName = 367,
+ eCSSPropertyAlias_MozAnimationPlayState = 368,
+ eCSSPropertyAlias_MozAnimationTimingFunction = 369,
+ eCSSPropertyAlias_MozBoxSizing = 370,
+ eCSSPropertyAlias_MozFontFeatureSettings = 371,
+ eCSSPropertyAlias_MozFontLanguageOverride = 372,
+ eCSSPropertyAlias_MozPaddingEnd = 373,
+ eCSSPropertyAlias_MozPaddingStart = 374,
+ eCSSPropertyAlias_MozMarginEnd = 375,
+ eCSSPropertyAlias_MozMarginStart = 376,
+ eCSSPropertyAlias_MozBorderEnd = 377,
+ eCSSPropertyAlias_MozBorderEndColor = 378,
+ eCSSPropertyAlias_MozBorderEndStyle = 379,
+ eCSSPropertyAlias_MozBorderEndWidth = 380,
+ eCSSPropertyAlias_MozBorderStart = 381,
+ eCSSPropertyAlias_MozBorderStartColor = 382,
+ eCSSPropertyAlias_MozBorderStartStyle = 383,
+ eCSSPropertyAlias_MozBorderStartWidth = 384,
+ eCSSPropertyAlias_MozHyphens = 385,
+ eCSSPropertyAlias_MozTextAlignLast = 386,
+ eCSSPropertyAlias_WebkitAnimation = 387,
+ eCSSPropertyAlias_WebkitAnimationDelay = 388,
+ eCSSPropertyAlias_WebkitAnimationDirection = 389,
+ eCSSPropertyAlias_WebkitAnimationDuration = 390,
+ eCSSPropertyAlias_WebkitAnimationFillMode = 391,
+ eCSSPropertyAlias_WebkitAnimationIterationCount = 392,
+ eCSSPropertyAlias_WebkitAnimationName = 393,
+ eCSSPropertyAlias_WebkitAnimationPlayState = 394,
+ eCSSPropertyAlias_WebkitAnimationTimingFunction = 395,
+ eCSSPropertyAlias_WebkitFilter = 396,
+ eCSSPropertyAlias_WebkitTextSizeAdjust = 397,
+ eCSSPropertyAlias_WebkitTransform = 398,
+ eCSSPropertyAlias_WebkitTransformOrigin = 399,
+ eCSSPropertyAlias_WebkitTransformStyle = 400,
+ eCSSPropertyAlias_WebkitBackfaceVisibility = 401,
+ eCSSPropertyAlias_WebkitPerspective = 402,
+ eCSSPropertyAlias_WebkitPerspectiveOrigin = 403,
+ eCSSPropertyAlias_WebkitTransition = 404,
+ eCSSPropertyAlias_WebkitTransitionDelay = 405,
+ eCSSPropertyAlias_WebkitTransitionDuration = 406,
+ eCSSPropertyAlias_WebkitTransitionProperty = 407,
+ eCSSPropertyAlias_WebkitTransitionTimingFunction = 408,
+ eCSSPropertyAlias_WebkitBorderRadius = 409,
+ eCSSPropertyAlias_WebkitBorderTopLeftRadius = 410,
+ eCSSPropertyAlias_WebkitBorderTopRightRadius = 411,
+ eCSSPropertyAlias_WebkitBorderBottomLeftRadius = 412,
+ eCSSPropertyAlias_WebkitBorderBottomRightRadius = 413,
+ eCSSPropertyAlias_WebkitBackgroundClip = 414,
+ eCSSPropertyAlias_WebkitBackgroundOrigin = 415,
+ eCSSPropertyAlias_WebkitBackgroundSize = 416,
+ eCSSPropertyAlias_WebkitBorderImage = 417,
+ eCSSPropertyAlias_WebkitBoxShadow = 418,
+ eCSSPropertyAlias_WebkitBoxSizing = 419,
+ eCSSPropertyAlias_WebkitBoxFlex = 420,
+ eCSSPropertyAlias_WebkitBoxOrdinalGroup = 421,
+ eCSSPropertyAlias_WebkitBoxOrient = 422,
+ eCSSPropertyAlias_WebkitBoxDirection = 423,
+ eCSSPropertyAlias_WebkitBoxAlign = 424,
+ eCSSPropertyAlias_WebkitBoxPack = 425,
+ eCSSPropertyAlias_WebkitFlexDirection = 426,
+ eCSSPropertyAlias_WebkitFlexWrap = 427,
+ eCSSPropertyAlias_WebkitFlexFlow = 428,
+ eCSSPropertyAlias_WebkitOrder = 429,
+ eCSSPropertyAlias_WebkitFlex = 430,
+ eCSSPropertyAlias_WebkitFlexGrow = 431,
+ eCSSPropertyAlias_WebkitFlexShrink = 432,
+ eCSSPropertyAlias_WebkitFlexBasis = 433,
+ eCSSPropertyAlias_WebkitJustifyContent = 434,
+ eCSSPropertyAlias_WebkitAlignItems = 435,
+ eCSSPropertyAlias_WebkitAlignSelf = 436,
+ eCSSPropertyAlias_WebkitAlignContent = 437,
+ eCSSPropertyAlias_WebkitUserSelect = 438,
+ eCSSProperty_COUNT_with_aliases = 439,
+ eCSSPropertyExtra_all_properties = 440,
+ eCSSPropertyExtra_x_none_value = 441,
+ eCSSPropertyExtra_x_auto_value = 442,
+ eCSSPropertyExtra_variable = 443,
}
#[repr(i32)]
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
@@ -5143,11 +5150,24 @@ pub type nsStyleUnion = nsStyleCoord_h_unnamed_18;
* the unit is a must before asking for the value in any particular
* form.
*/
+ /** <div rustbindgen private accessor="unsafe"></div> */
#[repr(C)]
#[derive(Debug)]
pub struct nsStyleCoord {
- pub mUnit: nsStyleUnit,
- pub mValue: nsStyleUnion,
+ mUnit: nsStyleUnit,
+ mValue: nsStyleUnion,
+}
+impl nsStyleCoord {
+ #[inline]
+ pub unsafe fn get_mUnit(&self) -> &nsStyleUnit { &self.mUnit }
+ pub unsafe fn get_mUnit_mut(&mut self) -> &mut nsStyleUnit {
+ &mut self.mUnit
+ }
+ #[inline]
+ pub unsafe fn get_mValue(&self) -> &nsStyleUnion { &self.mValue }
+ pub unsafe fn get_mValue_mut(&mut self) -> &mut nsStyleUnion {
+ &mut self.mValue
+ }
}
#[repr(C)]
#[derive(Debug, Copy)]
@@ -5188,11 +5208,26 @@ fn bindgen_test_layout_nsStyleCoord() {
* This is commonly used to hold the widths of the borders, margins,
* or paddings of a box.
*/
+ /** <div rustbindgen private accessor="unsafe"></div> */
#[repr(C)]
#[derive(Debug)]
pub struct nsStyleSides {
- pub mUnits: [nsStyleUnit; 4usize],
- pub mValues: [nsStyleUnion; 4usize],
+ mUnits: [nsStyleUnit; 4usize],
+ mValues: [nsStyleUnion; 4usize],
+}
+impl nsStyleSides {
+ #[inline]
+ pub unsafe fn get_mUnits(&self) -> &[nsStyleUnit; 4usize] { &self.mUnits }
+ pub unsafe fn get_mUnits_mut(&mut self) -> &mut [nsStyleUnit; 4usize] {
+ &mut self.mUnits
+ }
+ #[inline]
+ pub unsafe fn get_mValues(&self) -> &[nsStyleUnion; 4usize] {
+ &self.mValues
+ }
+ pub unsafe fn get_mValues_mut(&mut self) -> &mut [nsStyleUnion; 4usize] {
+ &mut self.mValues
+ }
}
#[test]
fn bindgen_test_layout_nsStyleSides() {
@@ -5204,11 +5239,26 @@ fn bindgen_test_layout_nsStyleSides() {
* nsStyleCoord pairs. This is used to hold the dimensions of the
* corners of a box (for, e.g., border-radius and outline-radius).
*/
+ /** <div rustbindgen private accessor="unsafe"></div> */
#[repr(C)]
#[derive(Debug)]
pub struct nsStyleCorners {
- pub mUnits: [nsStyleUnit; 8usize],
- pub mValues: [nsStyleUnion; 8usize],
+ mUnits: [nsStyleUnit; 8usize],
+ mValues: [nsStyleUnion; 8usize],
+}
+impl nsStyleCorners {
+ #[inline]
+ pub unsafe fn get_mUnits(&self) -> &[nsStyleUnit; 8usize] { &self.mUnits }
+ pub unsafe fn get_mUnits_mut(&mut self) -> &mut [nsStyleUnit; 8usize] {
+ &mut self.mUnits
+ }
+ #[inline]
+ pub unsafe fn get_mValues(&self) -> &[nsStyleUnion; 8usize] {
+ &self.mValues
+ }
+ pub unsafe fn get_mValues_mut(&mut self) -> &mut [nsStyleUnion; 8usize] {
+ &mut self.mValues
+ }
}
#[test]
fn bindgen_test_layout_nsStyleCorners() {
@@ -5771,12 +5821,14 @@ pub struct nsStyleTextReset {
pub mTextOverflow: nsStyleTextOverflow,
pub mTextDecorationLine: u8,
pub mUnicodeBidi: u8,
+ pub mInitialLetterSink: nscoord,
+ pub mInitialLetterSize: f32,
pub mTextDecorationStyle: u8,
pub mTextDecorationColor: nscolor,
}
#[test]
fn bindgen_test_layout_nsStyleTextReset() {
- assert_eq!(::std::mem::size_of::<nsStyleTextReset>() , 64usize);
+ assert_eq!(::std::mem::size_of::<nsStyleTextReset>() , 80usize);
assert_eq!(::std::mem::align_of::<nsStyleTextReset>() , 8usize);
}
#[repr(C)]
@@ -5879,14 +5931,6 @@ pub enum nsTimingFunction_Type {
}
#[repr(i32)]
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
-pub enum nsTimingFunction_StepSyntax {
- Keyword = 0,
- FunctionalWithoutKeyword = 1,
- FunctionalWithStartKeyword = 2,
- FunctionalWithEndKeyword = 3,
-}
-#[repr(i32)]
-#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
pub enum nsTimingFunction_Keyword { Implicit = 0, Explicit = 1, }
#[repr(C)]
#[derive(Debug, Copy)]
@@ -5928,7 +5972,6 @@ fn bindgen_test_layout_nsTimingFunction_nsStyleStruct_h_unnamed_23_nsStyleStruct
#[repr(C)]
#[derive(Debug, Copy)]
pub struct nsTimingFunction_nsStyleStruct_h_unnamed_23_nsStyleStruct_h_unnamed_25 {
- pub mStepSyntax: nsTimingFunction_StepSyntax,
pub mSteps: u32,
}
impl ::std::clone::Clone for
@@ -5938,7 +5981,7 @@ impl ::std::clone::Clone for
#[test]
fn bindgen_test_layout_nsTimingFunction_nsStyleStruct_h_unnamed_23_nsStyleStruct_h_unnamed_25() {
assert_eq!(::std::mem::size_of::<nsTimingFunction_nsStyleStruct_h_unnamed_23_nsStyleStruct_h_unnamed_25>()
- , 8usize);
+ , 4usize);
assert_eq!(::std::mem::align_of::<nsTimingFunction_nsStyleStruct_h_unnamed_23_nsStyleStruct_h_unnamed_25>()
, 4usize);
}
diff --git a/ports/geckolib/gecko_bindings/structs_release.rs b/ports/geckolib/gecko_bindings/structs_release.rs
index 4d23f96ff80..418b428cc16 100644
--- a/ports/geckolib/gecko_bindings/structs_release.rs
+++ b/ports/geckolib/gecko_bindings/structs_release.rs
@@ -347,6 +347,7 @@ pub const NS_STYLE_BORDER_STYLE_AUTO: ::std::os::raw::c_uint = 10;
pub const NS_STYLE_BORDER_IMAGE_REPEAT_STRETCH: ::std::os::raw::c_uint = 0;
pub const NS_STYLE_BORDER_IMAGE_REPEAT_REPEAT: ::std::os::raw::c_uint = 1;
pub const NS_STYLE_BORDER_IMAGE_REPEAT_ROUND: ::std::os::raw::c_uint = 2;
+pub const NS_STYLE_BORDER_IMAGE_REPEAT_SPACE: ::std::os::raw::c_uint = 3;
pub const NS_STYLE_BORDER_IMAGE_SLICE_NOFILL: ::std::os::raw::c_uint = 0;
pub const NS_STYLE_BORDER_IMAGE_SLICE_FILL: ::std::os::raw::c_uint = 1;
pub const NS_STYLE_CLEAR_NONE: ::std::os::raw::c_uint = 0;
@@ -1891,6 +1892,34 @@ fn bindgen_test_layout_NS_ConvertUTF8toUTF16() {
assert_eq!(::std::mem::align_of::<NS_ConvertUTF8toUTF16>() , 8usize);
}
pub type nsVoidableString = nsAutoString;
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct RefPtrTraits<U> {
+ pub _phantom0: ::std::marker::PhantomData<U>,
+}
+#[repr(C)]
+#[derive(Debug)]
+pub struct RefPtr<T> {
+ pub mRawPtr: *mut T,
+}
+#[repr(C)]
+#[derive(Debug)]
+pub struct RefPtr_Proxy<T, R, Args> {
+ pub mRawPtr: *mut T,
+ pub _phantom0: ::std::marker::PhantomData<R>,
+ pub _phantom1: ::std::marker::PhantomData<Args>,
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct RefPtr_ConstRemovingRefPtrTraits<T, U> {
+ pub _phantom0: ::std::marker::PhantomData<T>,
+ pub _phantom1: ::std::marker::PhantomData<U>,
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct RefPtrGetterAddRefs<T> {
+ pub mTargetSmartPtr: *mut RefPtr<T>,
+}
/**
* A "unique identifier". This is modeled after OSF DCE UUIDs.
*/
@@ -2047,34 +2076,6 @@ fn bindgen_test_layout_QITableEntry() {
assert_eq!(::std::mem::size_of::<QITableEntry>() , 16usize);
assert_eq!(::std::mem::align_of::<QITableEntry>() , 8usize);
}
-#[repr(C)]
-#[derive(Debug, Copy, Clone)]
-pub struct RefPtrTraits<U> {
- pub _phantom0: ::std::marker::PhantomData<U>,
-}
-#[repr(C)]
-#[derive(Debug)]
-pub struct RefPtr<T> {
- pub mRawPtr: *mut T,
-}
-#[repr(C)]
-#[derive(Debug)]
-pub struct RefPtr_Proxy<T, R, Args> {
- pub mRawPtr: *mut T,
- pub _phantom0: ::std::marker::PhantomData<R>,
- pub _phantom1: ::std::marker::PhantomData<Args>,
-}
-#[repr(C)]
-#[derive(Debug, Copy, Clone)]
-pub struct RefPtr_ConstRemovingRefPtrTraits<T, U> {
- pub _phantom0: ::std::marker::PhantomData<T>,
- pub _phantom1: ::std::marker::PhantomData<U>,
-}
-#[repr(C)]
-#[derive(Debug, Copy, Clone)]
-pub struct RefPtrGetterAddRefs<T> {
- pub mTargetSmartPtr: *mut RefPtr<T>,
-}
pub enum TileClient { }
#[repr(C)]
#[derive(Debug, Copy)]
@@ -2796,6 +2797,11 @@ pub enum nsNodeSupportsWeakRefTearoff { }
pub enum nsNodeWeakReference { }
pub enum nsDOMMutationObserver { }
pub enum ServoNodeData { }
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct DefaultDelete<> {
+ pub _phantom0: ::std::marker::PhantomData<ServoNodeData>,
+}
pub enum EventListenerManager { }
pub enum BoxQuadOptions { }
pub enum ConvertCoordinateOptions { }
@@ -4056,305 +4062,306 @@ pub enum nsCSSProperty {
eCSSProperty_grid_template_rows = 141,
eCSSProperty_height = 142,
eCSSProperty_hyphens = 143,
- eCSSProperty_image_orientation = 144,
- eCSSProperty_image_region = 145,
- eCSSProperty_image_rendering = 146,
- eCSSProperty_ime_mode = 147,
- eCSSProperty_inline_size = 148,
- eCSSProperty_isolation = 149,
- eCSSProperty_justify_content = 150,
- eCSSProperty_justify_items = 151,
- eCSSProperty_justify_self = 152,
- eCSSProperty__x_lang = 153,
- eCSSProperty_left = 154,
- eCSSProperty_letter_spacing = 155,
- eCSSProperty_lighting_color = 156,
- eCSSProperty_line_height = 157,
- eCSSProperty_list_style_image = 158,
- eCSSProperty_list_style_position = 159,
- eCSSProperty_list_style_type = 160,
- eCSSProperty_margin_block_end = 161,
- eCSSProperty_margin_block_start = 162,
- eCSSProperty_margin_bottom = 163,
- eCSSProperty_margin_inline_end = 164,
- eCSSProperty_margin_inline_start = 165,
- eCSSProperty_margin_left = 166,
- eCSSProperty_margin_right = 167,
- eCSSProperty_margin_top = 168,
- eCSSProperty_marker_end = 169,
- eCSSProperty_marker_mid = 170,
- eCSSProperty_marker_offset = 171,
- eCSSProperty_marker_start = 172,
- eCSSProperty_mask = 173,
- eCSSProperty_mask_type = 174,
- eCSSProperty_math_display = 175,
- eCSSProperty_math_variant = 176,
- eCSSProperty_max_block_size = 177,
- eCSSProperty_max_height = 178,
- eCSSProperty_max_inline_size = 179,
- eCSSProperty_max_width = 180,
- eCSSProperty_min_block_size = 181,
- eCSSProperty__moz_min_font_size_ratio = 182,
- eCSSProperty_min_height = 183,
- eCSSProperty_min_inline_size = 184,
- eCSSProperty_min_width = 185,
- eCSSProperty_mix_blend_mode = 186,
- eCSSProperty_object_fit = 187,
- eCSSProperty_object_position = 188,
- eCSSProperty_offset_block_end = 189,
- eCSSProperty_offset_block_start = 190,
- eCSSProperty_offset_inline_end = 191,
- eCSSProperty_offset_inline_start = 192,
- eCSSProperty_opacity = 193,
- eCSSProperty_order = 194,
- eCSSProperty_orient = 195,
- eCSSProperty_osx_font_smoothing = 196,
- eCSSProperty_outline_color = 197,
- eCSSProperty_outline_offset = 198,
- eCSSProperty__moz_outline_radius_bottomLeft = 199,
- eCSSProperty__moz_outline_radius_bottomRight = 200,
- eCSSProperty__moz_outline_radius_topLeft = 201,
- eCSSProperty__moz_outline_radius_topRight = 202,
- eCSSProperty_outline_style = 203,
- eCSSProperty_outline_width = 204,
- eCSSProperty_overflow_clip_box = 205,
- eCSSProperty_overflow_x = 206,
- eCSSProperty_overflow_y = 207,
- eCSSProperty_padding_block_end = 208,
- eCSSProperty_padding_block_start = 209,
- eCSSProperty_padding_bottom = 210,
- eCSSProperty_padding_inline_end = 211,
- eCSSProperty_padding_inline_start = 212,
- eCSSProperty_padding_left = 213,
- eCSSProperty_padding_right = 214,
- eCSSProperty_padding_top = 215,
- eCSSProperty_page_break_after = 216,
- eCSSProperty_page_break_before = 217,
- eCSSProperty_page_break_inside = 218,
- eCSSProperty_paint_order = 219,
- eCSSProperty_perspective = 220,
- eCSSProperty_perspective_origin = 221,
- eCSSProperty_pointer_events = 222,
- eCSSProperty_position = 223,
- eCSSProperty_quotes = 224,
- eCSSProperty_resize = 225,
- eCSSProperty_right = 226,
- eCSSProperty_ruby_align = 227,
- eCSSProperty_ruby_position = 228,
- eCSSProperty_script_level = 229,
- eCSSProperty_script_min_size = 230,
- eCSSProperty_script_size_multiplier = 231,
- eCSSProperty_scroll_behavior = 232,
- eCSSProperty_scroll_snap_coordinate = 233,
- eCSSProperty_scroll_snap_destination = 234,
- eCSSProperty_scroll_snap_points_x = 235,
- eCSSProperty_scroll_snap_points_y = 236,
- eCSSProperty_scroll_snap_type_x = 237,
- eCSSProperty_scroll_snap_type_y = 238,
- eCSSProperty_shape_rendering = 239,
- eCSSProperty__x_span = 240,
- eCSSProperty_stack_sizing = 241,
- eCSSProperty_stop_color = 242,
- eCSSProperty_stop_opacity = 243,
- eCSSProperty_stroke = 244,
- eCSSProperty_stroke_dasharray = 245,
- eCSSProperty_stroke_dashoffset = 246,
- eCSSProperty_stroke_linecap = 247,
- eCSSProperty_stroke_linejoin = 248,
- eCSSProperty_stroke_miterlimit = 249,
- eCSSProperty_stroke_opacity = 250,
- eCSSProperty_stroke_width = 251,
- eCSSProperty__x_system_font = 252,
- eCSSProperty__moz_tab_size = 253,
- eCSSProperty_table_layout = 254,
- eCSSProperty_text_align = 255,
- eCSSProperty_text_align_last = 256,
- eCSSProperty_text_anchor = 257,
- eCSSProperty_text_combine_upright = 258,
- eCSSProperty_text_decoration_color = 259,
- eCSSProperty_text_decoration_line = 260,
- eCSSProperty_text_decoration_style = 261,
- eCSSProperty_text_emphasis_color = 262,
- eCSSProperty_text_emphasis_position = 263,
- eCSSProperty_text_emphasis_style = 264,
- eCSSProperty__webkit_text_fill_color = 265,
- eCSSProperty_text_indent = 266,
- eCSSProperty_text_orientation = 267,
- eCSSProperty_text_overflow = 268,
- eCSSProperty_text_rendering = 269,
- eCSSProperty_text_shadow = 270,
- eCSSProperty_text_size_adjust = 271,
- eCSSProperty__webkit_text_stroke_color = 272,
- eCSSProperty__webkit_text_stroke_width = 273,
- eCSSProperty_text_transform = 274,
- eCSSProperty__x_text_zoom = 275,
- eCSSProperty_top = 276,
- eCSSProperty__moz_top_layer = 277,
- eCSSProperty_touch_action = 278,
- eCSSProperty_transform = 279,
- eCSSProperty_transform_box = 280,
- eCSSProperty_transform_origin = 281,
- eCSSProperty_transform_style = 282,
- eCSSProperty_transition_delay = 283,
- eCSSProperty_transition_duration = 284,
- eCSSProperty_transition_property = 285,
- eCSSProperty_transition_timing_function = 286,
- eCSSProperty_unicode_bidi = 287,
- eCSSProperty_user_focus = 288,
- eCSSProperty_user_input = 289,
- eCSSProperty_user_modify = 290,
- eCSSProperty_user_select = 291,
- eCSSProperty_vector_effect = 292,
- eCSSProperty_vertical_align = 293,
- eCSSProperty_visibility = 294,
- eCSSProperty_white_space = 295,
- eCSSProperty_width = 296,
- eCSSProperty_will_change = 297,
- eCSSProperty__moz_window_dragging = 298,
- eCSSProperty__moz_window_shadow = 299,
- eCSSProperty_word_break = 300,
- eCSSProperty_word_spacing = 301,
- eCSSProperty_overflow_wrap = 302,
- eCSSProperty_writing_mode = 303,
- eCSSProperty_z_index = 304,
- eCSSProperty_COUNT_no_shorthands = 305,
- eCSSProperty_animation = 306,
- eCSSProperty_background = 307,
- eCSSProperty_background_position = 308,
- eCSSProperty_border = 309,
- eCSSProperty_border_block_end = 310,
- eCSSProperty_border_block_start = 311,
- eCSSProperty_border_bottom = 312,
- eCSSProperty_border_color = 313,
- eCSSProperty_border_image = 314,
- eCSSProperty_border_inline_end = 315,
- eCSSProperty_border_inline_start = 316,
- eCSSProperty_border_left = 317,
- eCSSProperty_border_radius = 318,
- eCSSProperty_border_right = 319,
- eCSSProperty_border_style = 320,
- eCSSProperty_border_top = 321,
- eCSSProperty_border_width = 322,
- eCSSProperty__moz_column_rule = 323,
- eCSSProperty__moz_columns = 324,
- eCSSProperty_flex = 325,
- eCSSProperty_flex_flow = 326,
- eCSSProperty_font = 327,
- eCSSProperty_font_variant = 328,
- eCSSProperty_grid = 329,
- eCSSProperty_grid_area = 330,
- eCSSProperty_grid_column = 331,
- eCSSProperty_grid_gap = 332,
- eCSSProperty_grid_row = 333,
- eCSSProperty_grid_template = 334,
- eCSSProperty_list_style = 335,
- eCSSProperty_margin = 336,
- eCSSProperty_marker = 337,
- eCSSProperty_outline = 338,
- eCSSProperty__moz_outline_radius = 339,
- eCSSProperty_overflow = 340,
- eCSSProperty_padding = 341,
- eCSSProperty_scroll_snap_type = 342,
- eCSSProperty_text_decoration = 343,
- eCSSProperty_text_emphasis = 344,
- eCSSProperty__webkit_text_stroke = 345,
- eCSSProperty__moz_transform = 346,
- eCSSProperty_transition = 347,
- eCSSProperty_COUNT = 348,
- eCSSPropertyAlias_MozTransformOrigin = 349,
- eCSSPropertyAlias_MozPerspectiveOrigin = 350,
- eCSSPropertyAlias_MozPerspective = 351,
- eCSSPropertyAlias_MozTransformStyle = 352,
- eCSSPropertyAlias_MozBackfaceVisibility = 353,
- eCSSPropertyAlias_MozBorderImage = 354,
- eCSSPropertyAlias_MozTransition = 355,
- eCSSPropertyAlias_MozTransitionDelay = 356,
- eCSSPropertyAlias_MozTransitionDuration = 357,
- eCSSPropertyAlias_MozTransitionProperty = 358,
- eCSSPropertyAlias_MozTransitionTimingFunction = 359,
- eCSSPropertyAlias_MozAnimation = 360,
- eCSSPropertyAlias_MozAnimationDelay = 361,
- eCSSPropertyAlias_MozAnimationDirection = 362,
- eCSSPropertyAlias_MozAnimationDuration = 363,
- eCSSPropertyAlias_MozAnimationFillMode = 364,
- eCSSPropertyAlias_MozAnimationIterationCount = 365,
- eCSSPropertyAlias_MozAnimationName = 366,
- eCSSPropertyAlias_MozAnimationPlayState = 367,
- eCSSPropertyAlias_MozAnimationTimingFunction = 368,
- eCSSPropertyAlias_MozBoxSizing = 369,
- eCSSPropertyAlias_MozFontFeatureSettings = 370,
- eCSSPropertyAlias_MozFontLanguageOverride = 371,
- eCSSPropertyAlias_MozPaddingEnd = 372,
- eCSSPropertyAlias_MozPaddingStart = 373,
- eCSSPropertyAlias_MozMarginEnd = 374,
- eCSSPropertyAlias_MozMarginStart = 375,
- eCSSPropertyAlias_MozBorderEnd = 376,
- eCSSPropertyAlias_MozBorderEndColor = 377,
- eCSSPropertyAlias_MozBorderEndStyle = 378,
- eCSSPropertyAlias_MozBorderEndWidth = 379,
- eCSSPropertyAlias_MozBorderStart = 380,
- eCSSPropertyAlias_MozBorderStartColor = 381,
- eCSSPropertyAlias_MozBorderStartStyle = 382,
- eCSSPropertyAlias_MozBorderStartWidth = 383,
- eCSSPropertyAlias_MozHyphens = 384,
- eCSSPropertyAlias_MozTextAlignLast = 385,
- eCSSPropertyAlias_WebkitAnimation = 386,
- eCSSPropertyAlias_WebkitAnimationDelay = 387,
- eCSSPropertyAlias_WebkitAnimationDirection = 388,
- eCSSPropertyAlias_WebkitAnimationDuration = 389,
- eCSSPropertyAlias_WebkitAnimationFillMode = 390,
- eCSSPropertyAlias_WebkitAnimationIterationCount = 391,
- eCSSPropertyAlias_WebkitAnimationName = 392,
- eCSSPropertyAlias_WebkitAnimationPlayState = 393,
- eCSSPropertyAlias_WebkitAnimationTimingFunction = 394,
- eCSSPropertyAlias_WebkitFilter = 395,
- eCSSPropertyAlias_WebkitTextSizeAdjust = 396,
- eCSSPropertyAlias_WebkitTransform = 397,
- eCSSPropertyAlias_WebkitTransformOrigin = 398,
- eCSSPropertyAlias_WebkitTransformStyle = 399,
- eCSSPropertyAlias_WebkitBackfaceVisibility = 400,
- eCSSPropertyAlias_WebkitPerspective = 401,
- eCSSPropertyAlias_WebkitPerspectiveOrigin = 402,
- eCSSPropertyAlias_WebkitTransition = 403,
- eCSSPropertyAlias_WebkitTransitionDelay = 404,
- eCSSPropertyAlias_WebkitTransitionDuration = 405,
- eCSSPropertyAlias_WebkitTransitionProperty = 406,
- eCSSPropertyAlias_WebkitTransitionTimingFunction = 407,
- eCSSPropertyAlias_WebkitBorderRadius = 408,
- eCSSPropertyAlias_WebkitBorderTopLeftRadius = 409,
- eCSSPropertyAlias_WebkitBorderTopRightRadius = 410,
- eCSSPropertyAlias_WebkitBorderBottomLeftRadius = 411,
- eCSSPropertyAlias_WebkitBorderBottomRightRadius = 412,
- eCSSPropertyAlias_WebkitBackgroundClip = 413,
- eCSSPropertyAlias_WebkitBackgroundOrigin = 414,
- eCSSPropertyAlias_WebkitBackgroundSize = 415,
- eCSSPropertyAlias_WebkitBorderImage = 416,
- eCSSPropertyAlias_WebkitBoxShadow = 417,
- eCSSPropertyAlias_WebkitBoxSizing = 418,
- eCSSPropertyAlias_WebkitBoxFlex = 419,
- eCSSPropertyAlias_WebkitBoxOrdinalGroup = 420,
- eCSSPropertyAlias_WebkitBoxOrient = 421,
- eCSSPropertyAlias_WebkitBoxDirection = 422,
- eCSSPropertyAlias_WebkitBoxAlign = 423,
- eCSSPropertyAlias_WebkitBoxPack = 424,
- eCSSPropertyAlias_WebkitFlexDirection = 425,
- eCSSPropertyAlias_WebkitFlexWrap = 426,
- eCSSPropertyAlias_WebkitFlexFlow = 427,
- eCSSPropertyAlias_WebkitOrder = 428,
- eCSSPropertyAlias_WebkitFlex = 429,
- eCSSPropertyAlias_WebkitFlexGrow = 430,
- eCSSPropertyAlias_WebkitFlexShrink = 431,
- eCSSPropertyAlias_WebkitFlexBasis = 432,
- eCSSPropertyAlias_WebkitJustifyContent = 433,
- eCSSPropertyAlias_WebkitAlignItems = 434,
- eCSSPropertyAlias_WebkitAlignSelf = 435,
- eCSSPropertyAlias_WebkitAlignContent = 436,
- eCSSPropertyAlias_WebkitUserSelect = 437,
- eCSSProperty_COUNT_with_aliases = 438,
- eCSSPropertyExtra_all_properties = 439,
- eCSSPropertyExtra_x_none_value = 440,
- eCSSPropertyExtra_x_auto_value = 441,
- eCSSPropertyExtra_variable = 442,
+ eCSSProperty_initial_letter = 144,
+ eCSSProperty_image_orientation = 145,
+ eCSSProperty_image_region = 146,
+ eCSSProperty_image_rendering = 147,
+ eCSSProperty_ime_mode = 148,
+ eCSSProperty_inline_size = 149,
+ eCSSProperty_isolation = 150,
+ eCSSProperty_justify_content = 151,
+ eCSSProperty_justify_items = 152,
+ eCSSProperty_justify_self = 153,
+ eCSSProperty__x_lang = 154,
+ eCSSProperty_left = 155,
+ eCSSProperty_letter_spacing = 156,
+ eCSSProperty_lighting_color = 157,
+ eCSSProperty_line_height = 158,
+ eCSSProperty_list_style_image = 159,
+ eCSSProperty_list_style_position = 160,
+ eCSSProperty_list_style_type = 161,
+ eCSSProperty_margin_block_end = 162,
+ eCSSProperty_margin_block_start = 163,
+ eCSSProperty_margin_bottom = 164,
+ eCSSProperty_margin_inline_end = 165,
+ eCSSProperty_margin_inline_start = 166,
+ eCSSProperty_margin_left = 167,
+ eCSSProperty_margin_right = 168,
+ eCSSProperty_margin_top = 169,
+ eCSSProperty_marker_end = 170,
+ eCSSProperty_marker_mid = 171,
+ eCSSProperty_marker_offset = 172,
+ eCSSProperty_marker_start = 173,
+ eCSSProperty_mask = 174,
+ eCSSProperty_mask_type = 175,
+ eCSSProperty_math_display = 176,
+ eCSSProperty_math_variant = 177,
+ eCSSProperty_max_block_size = 178,
+ eCSSProperty_max_height = 179,
+ eCSSProperty_max_inline_size = 180,
+ eCSSProperty_max_width = 181,
+ eCSSProperty_min_block_size = 182,
+ eCSSProperty__moz_min_font_size_ratio = 183,
+ eCSSProperty_min_height = 184,
+ eCSSProperty_min_inline_size = 185,
+ eCSSProperty_min_width = 186,
+ eCSSProperty_mix_blend_mode = 187,
+ eCSSProperty_object_fit = 188,
+ eCSSProperty_object_position = 189,
+ eCSSProperty_offset_block_end = 190,
+ eCSSProperty_offset_block_start = 191,
+ eCSSProperty_offset_inline_end = 192,
+ eCSSProperty_offset_inline_start = 193,
+ eCSSProperty_opacity = 194,
+ eCSSProperty_order = 195,
+ eCSSProperty_orient = 196,
+ eCSSProperty_osx_font_smoothing = 197,
+ eCSSProperty_outline_color = 198,
+ eCSSProperty_outline_offset = 199,
+ eCSSProperty__moz_outline_radius_bottomLeft = 200,
+ eCSSProperty__moz_outline_radius_bottomRight = 201,
+ eCSSProperty__moz_outline_radius_topLeft = 202,
+ eCSSProperty__moz_outline_radius_topRight = 203,
+ eCSSProperty_outline_style = 204,
+ eCSSProperty_outline_width = 205,
+ eCSSProperty_overflow_clip_box = 206,
+ eCSSProperty_overflow_x = 207,
+ eCSSProperty_overflow_y = 208,
+ eCSSProperty_padding_block_end = 209,
+ eCSSProperty_padding_block_start = 210,
+ eCSSProperty_padding_bottom = 211,
+ eCSSProperty_padding_inline_end = 212,
+ eCSSProperty_padding_inline_start = 213,
+ eCSSProperty_padding_left = 214,
+ eCSSProperty_padding_right = 215,
+ eCSSProperty_padding_top = 216,
+ eCSSProperty_page_break_after = 217,
+ eCSSProperty_page_break_before = 218,
+ eCSSProperty_page_break_inside = 219,
+ eCSSProperty_paint_order = 220,
+ eCSSProperty_perspective = 221,
+ eCSSProperty_perspective_origin = 222,
+ eCSSProperty_pointer_events = 223,
+ eCSSProperty_position = 224,
+ eCSSProperty_quotes = 225,
+ eCSSProperty_resize = 226,
+ eCSSProperty_right = 227,
+ eCSSProperty_ruby_align = 228,
+ eCSSProperty_ruby_position = 229,
+ eCSSProperty_script_level = 230,
+ eCSSProperty_script_min_size = 231,
+ eCSSProperty_script_size_multiplier = 232,
+ eCSSProperty_scroll_behavior = 233,
+ eCSSProperty_scroll_snap_coordinate = 234,
+ eCSSProperty_scroll_snap_destination = 235,
+ eCSSProperty_scroll_snap_points_x = 236,
+ eCSSProperty_scroll_snap_points_y = 237,
+ eCSSProperty_scroll_snap_type_x = 238,
+ eCSSProperty_scroll_snap_type_y = 239,
+ eCSSProperty_shape_rendering = 240,
+ eCSSProperty__x_span = 241,
+ eCSSProperty_stack_sizing = 242,
+ eCSSProperty_stop_color = 243,
+ eCSSProperty_stop_opacity = 244,
+ eCSSProperty_stroke = 245,
+ eCSSProperty_stroke_dasharray = 246,
+ eCSSProperty_stroke_dashoffset = 247,
+ eCSSProperty_stroke_linecap = 248,
+ eCSSProperty_stroke_linejoin = 249,
+ eCSSProperty_stroke_miterlimit = 250,
+ eCSSProperty_stroke_opacity = 251,
+ eCSSProperty_stroke_width = 252,
+ eCSSProperty__x_system_font = 253,
+ eCSSProperty__moz_tab_size = 254,
+ eCSSProperty_table_layout = 255,
+ eCSSProperty_text_align = 256,
+ eCSSProperty_text_align_last = 257,
+ eCSSProperty_text_anchor = 258,
+ eCSSProperty_text_combine_upright = 259,
+ eCSSProperty_text_decoration_color = 260,
+ eCSSProperty_text_decoration_line = 261,
+ eCSSProperty_text_decoration_style = 262,
+ eCSSProperty_text_emphasis_color = 263,
+ eCSSProperty_text_emphasis_position = 264,
+ eCSSProperty_text_emphasis_style = 265,
+ eCSSProperty__webkit_text_fill_color = 266,
+ eCSSProperty_text_indent = 267,
+ eCSSProperty_text_orientation = 268,
+ eCSSProperty_text_overflow = 269,
+ eCSSProperty_text_rendering = 270,
+ eCSSProperty_text_shadow = 271,
+ eCSSProperty_text_size_adjust = 272,
+ eCSSProperty__webkit_text_stroke_color = 273,
+ eCSSProperty__webkit_text_stroke_width = 274,
+ eCSSProperty_text_transform = 275,
+ eCSSProperty__x_text_zoom = 276,
+ eCSSProperty_top = 277,
+ eCSSProperty__moz_top_layer = 278,
+ eCSSProperty_touch_action = 279,
+ eCSSProperty_transform = 280,
+ eCSSProperty_transform_box = 281,
+ eCSSProperty_transform_origin = 282,
+ eCSSProperty_transform_style = 283,
+ eCSSProperty_transition_delay = 284,
+ eCSSProperty_transition_duration = 285,
+ eCSSProperty_transition_property = 286,
+ eCSSProperty_transition_timing_function = 287,
+ eCSSProperty_unicode_bidi = 288,
+ eCSSProperty_user_focus = 289,
+ eCSSProperty_user_input = 290,
+ eCSSProperty_user_modify = 291,
+ eCSSProperty_user_select = 292,
+ eCSSProperty_vector_effect = 293,
+ eCSSProperty_vertical_align = 294,
+ eCSSProperty_visibility = 295,
+ eCSSProperty_white_space = 296,
+ eCSSProperty_width = 297,
+ eCSSProperty_will_change = 298,
+ eCSSProperty__moz_window_dragging = 299,
+ eCSSProperty__moz_window_shadow = 300,
+ eCSSProperty_word_break = 301,
+ eCSSProperty_word_spacing = 302,
+ eCSSProperty_overflow_wrap = 303,
+ eCSSProperty_writing_mode = 304,
+ eCSSProperty_z_index = 305,
+ eCSSProperty_COUNT_no_shorthands = 306,
+ eCSSProperty_animation = 307,
+ eCSSProperty_background = 308,
+ eCSSProperty_background_position = 309,
+ eCSSProperty_border = 310,
+ eCSSProperty_border_block_end = 311,
+ eCSSProperty_border_block_start = 312,
+ eCSSProperty_border_bottom = 313,
+ eCSSProperty_border_color = 314,
+ eCSSProperty_border_image = 315,
+ eCSSProperty_border_inline_end = 316,
+ eCSSProperty_border_inline_start = 317,
+ eCSSProperty_border_left = 318,
+ eCSSProperty_border_radius = 319,
+ eCSSProperty_border_right = 320,
+ eCSSProperty_border_style = 321,
+ eCSSProperty_border_top = 322,
+ eCSSProperty_border_width = 323,
+ eCSSProperty__moz_column_rule = 324,
+ eCSSProperty__moz_columns = 325,
+ eCSSProperty_flex = 326,
+ eCSSProperty_flex_flow = 327,
+ eCSSProperty_font = 328,
+ eCSSProperty_font_variant = 329,
+ eCSSProperty_grid = 330,
+ eCSSProperty_grid_area = 331,
+ eCSSProperty_grid_column = 332,
+ eCSSProperty_grid_gap = 333,
+ eCSSProperty_grid_row = 334,
+ eCSSProperty_grid_template = 335,
+ eCSSProperty_list_style = 336,
+ eCSSProperty_margin = 337,
+ eCSSProperty_marker = 338,
+ eCSSProperty_outline = 339,
+ eCSSProperty__moz_outline_radius = 340,
+ eCSSProperty_overflow = 341,
+ eCSSProperty_padding = 342,
+ eCSSProperty_scroll_snap_type = 343,
+ eCSSProperty_text_decoration = 344,
+ eCSSProperty_text_emphasis = 345,
+ eCSSProperty__webkit_text_stroke = 346,
+ eCSSProperty__moz_transform = 347,
+ eCSSProperty_transition = 348,
+ eCSSProperty_COUNT = 349,
+ eCSSPropertyAlias_MozTransformOrigin = 350,
+ eCSSPropertyAlias_MozPerspectiveOrigin = 351,
+ eCSSPropertyAlias_MozPerspective = 352,
+ eCSSPropertyAlias_MozTransformStyle = 353,
+ eCSSPropertyAlias_MozBackfaceVisibility = 354,
+ eCSSPropertyAlias_MozBorderImage = 355,
+ eCSSPropertyAlias_MozTransition = 356,
+ eCSSPropertyAlias_MozTransitionDelay = 357,
+ eCSSPropertyAlias_MozTransitionDuration = 358,
+ eCSSPropertyAlias_MozTransitionProperty = 359,
+ eCSSPropertyAlias_MozTransitionTimingFunction = 360,
+ eCSSPropertyAlias_MozAnimation = 361,
+ eCSSPropertyAlias_MozAnimationDelay = 362,
+ eCSSPropertyAlias_MozAnimationDirection = 363,
+ eCSSPropertyAlias_MozAnimationDuration = 364,
+ eCSSPropertyAlias_MozAnimationFillMode = 365,
+ eCSSPropertyAlias_MozAnimationIterationCount = 366,
+ eCSSPropertyAlias_MozAnimationName = 367,
+ eCSSPropertyAlias_MozAnimationPlayState = 368,
+ eCSSPropertyAlias_MozAnimationTimingFunction = 369,
+ eCSSPropertyAlias_MozBoxSizing = 370,
+ eCSSPropertyAlias_MozFontFeatureSettings = 371,
+ eCSSPropertyAlias_MozFontLanguageOverride = 372,
+ eCSSPropertyAlias_MozPaddingEnd = 373,
+ eCSSPropertyAlias_MozPaddingStart = 374,
+ eCSSPropertyAlias_MozMarginEnd = 375,
+ eCSSPropertyAlias_MozMarginStart = 376,
+ eCSSPropertyAlias_MozBorderEnd = 377,
+ eCSSPropertyAlias_MozBorderEndColor = 378,
+ eCSSPropertyAlias_MozBorderEndStyle = 379,
+ eCSSPropertyAlias_MozBorderEndWidth = 380,
+ eCSSPropertyAlias_MozBorderStart = 381,
+ eCSSPropertyAlias_MozBorderStartColor = 382,
+ eCSSPropertyAlias_MozBorderStartStyle = 383,
+ eCSSPropertyAlias_MozBorderStartWidth = 384,
+ eCSSPropertyAlias_MozHyphens = 385,
+ eCSSPropertyAlias_MozTextAlignLast = 386,
+ eCSSPropertyAlias_WebkitAnimation = 387,
+ eCSSPropertyAlias_WebkitAnimationDelay = 388,
+ eCSSPropertyAlias_WebkitAnimationDirection = 389,
+ eCSSPropertyAlias_WebkitAnimationDuration = 390,
+ eCSSPropertyAlias_WebkitAnimationFillMode = 391,
+ eCSSPropertyAlias_WebkitAnimationIterationCount = 392,
+ eCSSPropertyAlias_WebkitAnimationName = 393,
+ eCSSPropertyAlias_WebkitAnimationPlayState = 394,
+ eCSSPropertyAlias_WebkitAnimationTimingFunction = 395,
+ eCSSPropertyAlias_WebkitFilter = 396,
+ eCSSPropertyAlias_WebkitTextSizeAdjust = 397,
+ eCSSPropertyAlias_WebkitTransform = 398,
+ eCSSPropertyAlias_WebkitTransformOrigin = 399,
+ eCSSPropertyAlias_WebkitTransformStyle = 400,
+ eCSSPropertyAlias_WebkitBackfaceVisibility = 401,
+ eCSSPropertyAlias_WebkitPerspective = 402,
+ eCSSPropertyAlias_WebkitPerspectiveOrigin = 403,
+ eCSSPropertyAlias_WebkitTransition = 404,
+ eCSSPropertyAlias_WebkitTransitionDelay = 405,
+ eCSSPropertyAlias_WebkitTransitionDuration = 406,
+ eCSSPropertyAlias_WebkitTransitionProperty = 407,
+ eCSSPropertyAlias_WebkitTransitionTimingFunction = 408,
+ eCSSPropertyAlias_WebkitBorderRadius = 409,
+ eCSSPropertyAlias_WebkitBorderTopLeftRadius = 410,
+ eCSSPropertyAlias_WebkitBorderTopRightRadius = 411,
+ eCSSPropertyAlias_WebkitBorderBottomLeftRadius = 412,
+ eCSSPropertyAlias_WebkitBorderBottomRightRadius = 413,
+ eCSSPropertyAlias_WebkitBackgroundClip = 414,
+ eCSSPropertyAlias_WebkitBackgroundOrigin = 415,
+ eCSSPropertyAlias_WebkitBackgroundSize = 416,
+ eCSSPropertyAlias_WebkitBorderImage = 417,
+ eCSSPropertyAlias_WebkitBoxShadow = 418,
+ eCSSPropertyAlias_WebkitBoxSizing = 419,
+ eCSSPropertyAlias_WebkitBoxFlex = 420,
+ eCSSPropertyAlias_WebkitBoxOrdinalGroup = 421,
+ eCSSPropertyAlias_WebkitBoxOrient = 422,
+ eCSSPropertyAlias_WebkitBoxDirection = 423,
+ eCSSPropertyAlias_WebkitBoxAlign = 424,
+ eCSSPropertyAlias_WebkitBoxPack = 425,
+ eCSSPropertyAlias_WebkitFlexDirection = 426,
+ eCSSPropertyAlias_WebkitFlexWrap = 427,
+ eCSSPropertyAlias_WebkitFlexFlow = 428,
+ eCSSPropertyAlias_WebkitOrder = 429,
+ eCSSPropertyAlias_WebkitFlex = 430,
+ eCSSPropertyAlias_WebkitFlexGrow = 431,
+ eCSSPropertyAlias_WebkitFlexShrink = 432,
+ eCSSPropertyAlias_WebkitFlexBasis = 433,
+ eCSSPropertyAlias_WebkitJustifyContent = 434,
+ eCSSPropertyAlias_WebkitAlignItems = 435,
+ eCSSPropertyAlias_WebkitAlignSelf = 436,
+ eCSSPropertyAlias_WebkitAlignContent = 437,
+ eCSSPropertyAlias_WebkitUserSelect = 438,
+ eCSSProperty_COUNT_with_aliases = 439,
+ eCSSPropertyExtra_all_properties = 440,
+ eCSSPropertyExtra_x_none_value = 441,
+ eCSSPropertyExtra_x_auto_value = 442,
+ eCSSPropertyExtra_variable = 443,
}
#[repr(i32)]
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
@@ -5122,11 +5129,24 @@ pub type nsStyleUnion = nsStyleCoord_h_unnamed_18;
* the unit is a must before asking for the value in any particular
* form.
*/
+ /** <div rustbindgen private accessor="unsafe"></div> */
#[repr(C)]
#[derive(Debug)]
pub struct nsStyleCoord {
- pub mUnit: nsStyleUnit,
- pub mValue: nsStyleUnion,
+ mUnit: nsStyleUnit,
+ mValue: nsStyleUnion,
+}
+impl nsStyleCoord {
+ #[inline]
+ pub unsafe fn get_mUnit(&self) -> &nsStyleUnit { &self.mUnit }
+ pub unsafe fn get_mUnit_mut(&mut self) -> &mut nsStyleUnit {
+ &mut self.mUnit
+ }
+ #[inline]
+ pub unsafe fn get_mValue(&self) -> &nsStyleUnion { &self.mValue }
+ pub unsafe fn get_mValue_mut(&mut self) -> &mut nsStyleUnion {
+ &mut self.mValue
+ }
}
#[repr(C)]
#[derive(Debug, Copy)]
@@ -5167,11 +5187,26 @@ fn bindgen_test_layout_nsStyleCoord() {
* This is commonly used to hold the widths of the borders, margins,
* or paddings of a box.
*/
+ /** <div rustbindgen private accessor="unsafe"></div> */
#[repr(C)]
#[derive(Debug)]
pub struct nsStyleSides {
- pub mUnits: [nsStyleUnit; 4usize],
- pub mValues: [nsStyleUnion; 4usize],
+ mUnits: [nsStyleUnit; 4usize],
+ mValues: [nsStyleUnion; 4usize],
+}
+impl nsStyleSides {
+ #[inline]
+ pub unsafe fn get_mUnits(&self) -> &[nsStyleUnit; 4usize] { &self.mUnits }
+ pub unsafe fn get_mUnits_mut(&mut self) -> &mut [nsStyleUnit; 4usize] {
+ &mut self.mUnits
+ }
+ #[inline]
+ pub unsafe fn get_mValues(&self) -> &[nsStyleUnion; 4usize] {
+ &self.mValues
+ }
+ pub unsafe fn get_mValues_mut(&mut self) -> &mut [nsStyleUnion; 4usize] {
+ &mut self.mValues
+ }
}
#[test]
fn bindgen_test_layout_nsStyleSides() {
@@ -5183,11 +5218,26 @@ fn bindgen_test_layout_nsStyleSides() {
* nsStyleCoord pairs. This is used to hold the dimensions of the
* corners of a box (for, e.g., border-radius and outline-radius).
*/
+ /** <div rustbindgen private accessor="unsafe"></div> */
#[repr(C)]
#[derive(Debug)]
pub struct nsStyleCorners {
- pub mUnits: [nsStyleUnit; 8usize],
- pub mValues: [nsStyleUnion; 8usize],
+ mUnits: [nsStyleUnit; 8usize],
+ mValues: [nsStyleUnion; 8usize],
+}
+impl nsStyleCorners {
+ #[inline]
+ pub unsafe fn get_mUnits(&self) -> &[nsStyleUnit; 8usize] { &self.mUnits }
+ pub unsafe fn get_mUnits_mut(&mut self) -> &mut [nsStyleUnit; 8usize] {
+ &mut self.mUnits
+ }
+ #[inline]
+ pub unsafe fn get_mValues(&self) -> &[nsStyleUnion; 8usize] {
+ &self.mValues
+ }
+ pub unsafe fn get_mValues_mut(&mut self) -> &mut [nsStyleUnion; 8usize] {
+ &mut self.mValues
+ }
}
#[test]
fn bindgen_test_layout_nsStyleCorners() {
@@ -5749,12 +5799,14 @@ pub struct nsStyleTextReset {
pub mTextOverflow: nsStyleTextOverflow,
pub mTextDecorationLine: u8,
pub mUnicodeBidi: u8,
+ pub mInitialLetterSink: nscoord,
+ pub mInitialLetterSize: f32,
pub mTextDecorationStyle: u8,
pub mTextDecorationColor: nscolor,
}
#[test]
fn bindgen_test_layout_nsStyleTextReset() {
- assert_eq!(::std::mem::size_of::<nsStyleTextReset>() , 64usize);
+ assert_eq!(::std::mem::size_of::<nsStyleTextReset>() , 80usize);
assert_eq!(::std::mem::align_of::<nsStyleTextReset>() , 8usize);
}
#[repr(C)]
@@ -5857,14 +5909,6 @@ pub enum nsTimingFunction_Type {
}
#[repr(i32)]
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
-pub enum nsTimingFunction_StepSyntax {
- Keyword = 0,
- FunctionalWithoutKeyword = 1,
- FunctionalWithStartKeyword = 2,
- FunctionalWithEndKeyword = 3,
-}
-#[repr(i32)]
-#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
pub enum nsTimingFunction_Keyword { Implicit = 0, Explicit = 1, }
#[repr(C)]
#[derive(Debug, Copy)]
@@ -5906,7 +5950,6 @@ fn bindgen_test_layout_nsTimingFunction_nsStyleStruct_h_unnamed_23_nsStyleStruct
#[repr(C)]
#[derive(Debug, Copy)]
pub struct nsTimingFunction_nsStyleStruct_h_unnamed_23_nsStyleStruct_h_unnamed_25 {
- pub mStepSyntax: nsTimingFunction_StepSyntax,
pub mSteps: u32,
}
impl ::std::clone::Clone for
@@ -5916,7 +5959,7 @@ impl ::std::clone::Clone for
#[test]
fn bindgen_test_layout_nsTimingFunction_nsStyleStruct_h_unnamed_23_nsStyleStruct_h_unnamed_25() {
assert_eq!(::std::mem::size_of::<nsTimingFunction_nsStyleStruct_h_unnamed_23_nsStyleStruct_h_unnamed_25>()
- , 8usize);
+ , 4usize);
assert_eq!(::std::mem::align_of::<nsTimingFunction_nsStyleStruct_h_unnamed_23_nsStyleStruct_h_unnamed_25>()
, 4usize);
}
diff --git a/ports/geckolib/gecko_bindings/sugar/ns_style_coord.rs b/ports/geckolib/gecko_bindings/sugar/ns_style_coord.rs
index 33dff1a705d..a13f08ea37b 100644
--- a/ports/geckolib/gecko_bindings/sugar/ns_style_coord.rs
+++ b/ports/geckolib/gecko_bindings/sugar/ns_style_coord.rs
@@ -3,24 +3,29 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use bindings::{Gecko_ResetStyleCoord, Gecko_SetStyleCoordCalcValue, Gecko_AddRefCalcArbitraryThread};
-use std::mem::transmute;
use structs::{nsStyleCoord_Calc, nsStyleUnit, nsStyleUnion, nsStyleCoord, nsStyleSides, nsStyleCorners};
use structs::{nsStyleCoord_CalcValue, nscoord};
impl CoordData for nsStyleCoord {
#[inline]
fn unit(&self) -> nsStyleUnit {
- self.mUnit
+ unsafe {
+ *self.get_mUnit()
+ }
}
#[inline]
fn union(&self) -> nsStyleUnion {
- self.mValue
+ unsafe {
+ *self.get_mValue()
+ }
}
}
impl CoordDataMut for nsStyleCoord {
unsafe fn values_mut(&mut self) -> (&mut nsStyleUnit, &mut nsStyleUnion) {
- (&mut self.mUnit, &mut self.mValue)
+ let unit = self.get_mUnit_mut() as *mut _;
+ let value = self.get_mValue_mut() as *mut _;
+ (&mut *unit, &mut *value)
}
}
@@ -53,26 +58,36 @@ pub struct SidesDataMut<'a> {
impl<'a> CoordData for SidesData<'a> {
#[inline]
fn unit(&self) -> nsStyleUnit {
- self.sides.mUnits[self.index]
+ unsafe {
+ self.sides.get_mUnits()[self.index]
+ }
}
#[inline]
fn union(&self) -> nsStyleUnion {
- self.sides.mValues[self.index]
+ unsafe {
+ self.sides.get_mValues()[self.index]
+ }
}
}
impl<'a> CoordData for SidesDataMut<'a> {
#[inline]
fn unit(&self) -> nsStyleUnit {
- self.sides.mUnits[self.index]
+ unsafe {
+ self.sides.get_mUnits()[self.index]
+ }
}
#[inline]
fn union(&self) -> nsStyleUnion {
- self.sides.mValues[self.index]
+ unsafe {
+ self.sides.get_mValues()[self.index]
+ }
}
}
impl<'a> CoordDataMut for SidesDataMut<'a> {
unsafe fn values_mut(&mut self) -> (&mut nsStyleUnit, &mut nsStyleUnion) {
- (&mut self.sides.mUnits[self.index], &mut self.sides.mValues[self.index])
+ let unit = &mut self.sides.get_mUnits_mut()[self.index] as *mut _;
+ let value = &mut self.sides.get_mValues_mut()[self.index] as *mut _;
+ (&mut *unit, &mut *value)
}
}
@@ -104,23 +119,33 @@ pub struct CornersDataMut<'a> {
impl<'a> CoordData for CornersData<'a> {
fn unit(&self) -> nsStyleUnit {
- self.corners.mUnits[self.index]
+ unsafe {
+ self.corners.get_mUnits()[self.index]
+ }
}
fn union(&self) -> nsStyleUnion {
- self.corners.mValues[self.index]
+ unsafe {
+ self.corners.get_mValues()[self.index]
+ }
}
}
impl<'a> CoordData for CornersDataMut<'a> {
fn unit(&self) -> nsStyleUnit {
- self.corners.mUnits[self.index]
+ unsafe {
+ self.corners.get_mUnits()[self.index]
+ }
}
fn union(&self) -> nsStyleUnion {
- self.corners.mValues[self.index]
+ unsafe {
+ self.corners.get_mValues()[self.index]
+ }
}
}
impl<'a> CoordDataMut for CornersDataMut<'a> {
unsafe fn values_mut(&mut self) -> (&mut nsStyleUnit, &mut nsStyleUnion) {
- (&mut self.corners.mUnits[self.index], &mut self.corners.mValues[self.index])
+ let unit = &mut self.corners.get_mUnits_mut()[self.index] as *mut _;
+ let value = &mut self.corners.get_mValues_mut()[self.index] as *mut _;
+ (&mut *unit, &mut *value)
}
}
@@ -179,6 +204,13 @@ pub trait CoordDataMut : CoordData {
}
}
+ #[inline]
+ unsafe fn copy_from_unchecked<T: CoordData>(&mut self, other: &T) {
+ let (unit, union) = self.values_mut();
+ *unit = other.unit();
+ *union = other.union();
+ }
+
#[inline(always)]
fn set_value(&mut self, value: CoordDataValue) {
use self::CoordDataValue::*;
@@ -254,7 +286,7 @@ pub trait CoordDataMut : CoordData {
#[inline]
unsafe fn as_calc_mut(&mut self) -> &mut nsStyleCoord_Calc {
debug_assert!(self.unit() == nsStyleUnit::eStyleUnit_Calc);
- transmute(*self.union().mPointer.as_mut() as *mut nsStyleCoord_Calc)
+ &mut *(*self.union().mPointer.as_mut() as *mut nsStyleCoord_Calc)
}
#[inline]
@@ -328,6 +360,6 @@ pub trait CoordData {
#[inline]
unsafe fn as_calc(&self) -> &nsStyleCoord_Calc {
debug_assert!(self.unit() == nsStyleUnit::eStyleUnit_Calc);
- transmute(*self.union().mPointer.as_ref() as *const nsStyleCoord_Calc)
+ &*(*self.union().mPointer.as_ref() as *const nsStyleCoord_Calc)
}
}
diff --git a/ports/geckolib/gecko_bindings/tools/regen.py b/ports/geckolib/gecko_bindings/tools/regen.py
index 29dc162a027..821a5e475a7 100755
--- a/ports/geckolib/gecko_bindings/tools/regen.py
+++ b/ports/geckolib/gecko_bindings/tools/regen.py
@@ -25,7 +25,7 @@ COMPILATION_TARGETS = {
"-allow-unknown-types", "-no-bitfield-methods",
"-no-type-renaming", "-no-namespaced-constants",
"-DTRACING=1", "-DIMPL_LIBXUL", "-DMOZ_STYLO_BINDINGS=1",
- "-DMOZILLA_INTERNAL_API",
+ "-DMOZILLA_INTERNAL_API", "-DRUST_BINDGEN",
],
"search_dirs": [
"{}/dist/include",
diff --git a/ports/geckolib/glue.rs b/ports/geckolib/glue.rs
index 288e65431e5..7c562099c43 100644
--- a/ports/geckolib/glue.rs
+++ b/ports/geckolib/glue.rs
@@ -81,8 +81,6 @@ pub extern "C" fn Servo_Initialize() -> () {
fn restyle_subtree(node: GeckoNode, raw_data: *mut RawServoStyleSet) {
debug_assert!(node.is_element() || node.is_text_node());
- let per_doc_data = unsafe { &mut *(raw_data as *mut PerDocumentStyleData) };
-
// Force the creation of our lazily-constructed initial computed values on
// the main thread, since it's not safe to call elsewhere.
//
@@ -92,10 +90,9 @@ fn restyle_subtree(node: GeckoNode, raw_data: *mut RawServoStyleSet) {
// along in startup than the sensible place to call Servo_Initialize.
ComputedValues::initial_values();
- let _needs_dirtying = Arc::get_mut(&mut per_doc_data.stylist).unwrap()
- .update(&per_doc_data.stylesheets,
- per_doc_data.stylesheets_changed);
- per_doc_data.stylesheets_changed = false;
+ // The stylist consumes stylesheets lazily.
+ let per_doc_data = unsafe { &mut *(raw_data as *mut PerDocumentStyleData) };
+ per_doc_data.flush_stylesheets();
let local_context_data =
LocalStyleContextCreationInfo::new(per_doc_data.new_animations_sender.clone());
@@ -274,7 +271,9 @@ pub extern "C" fn Servo_GetComputedValuesForAnonymousBox(parent_style_or_null: *
pseudo_tag: *mut nsIAtom,
raw_data: *mut RawServoStyleSet)
-> *mut ServoComputedValues {
+ // The stylist consumes stylesheets lazily.
let data = PerDocumentStyleData::borrow_mut_from_raw(raw_data);
+ data.flush_stylesheets();
let pseudo = match pseudo_element_from_atom(pseudo_tag, /* ua_stylesheet = */ true) {
Ok(pseudo) => pseudo,
@@ -319,7 +318,9 @@ pub extern "C" fn Servo_GetComputedValuesForPseudoElement(parent_style: *mut Ser
};
+ // The stylist consumes stylesheets lazily.
let data = PerDocumentStyleData::borrow_mut_from_raw(raw_data);
+ data.flush_stylesheets();
let element = unsafe { GeckoElement::from_raw(match_element) };
diff --git a/tests/unit/style/attr.rs b/tests/unit/style/attr.rs
index 4ae614eae2d..0521df3a690 100644
--- a/tests/unit/style/attr.rs
+++ b/tests/unit/style/attr.rs
@@ -15,6 +15,24 @@ fn test_parse_double() {
}
#[test]
+fn test_parse_double_negative_prefix() {
+ let value = String::from("-5.6");
+ match AttrValue::from_double(value, 0.0) {
+ AttrValue::Double(_, num) => assert_eq!(num, -5.6f64),
+ _ => panic!("expected a double value")
+ }
+}
+
+#[test]
+fn test_parse_double_positive_prefix() {
+ let value = String::from("+5.6");
+ match AttrValue::from_double(value, 0.0) {
+ AttrValue::Double(_, num) => assert_eq!(num, 5.6f64),
+ _ => panic!("expected a double value")
+ }
+}
+
+#[test]
fn test_from_limited_i32_should_be_default_when_less_than_0() {
let value = String::from("-1");
match AttrValue::from_limited_i32(value, 0) {
diff --git a/tests/wpt/metadata/html/dom/interfaces.html.ini b/tests/wpt/metadata/html/dom/interfaces.html.ini
index 7696abf478f..9cf7bd0c315 100644
--- a/tests/wpt/metadata/html/dom/interfaces.html.ini
+++ b/tests/wpt/metadata/html/dom/interfaces.html.ini
@@ -1572,15 +1572,9 @@
[HTMLUListElement interface: attribute type]
expected: FAIL
- [HTMLLIElement interface: attribute value]
- expected: FAIL
-
[HTMLLIElement interface: attribute type]
expected: FAIL
- [HTMLLIElement interface: document.createElement("li") must inherit property "value" with the proper type (0)]
- expected: FAIL
-
[HTMLLIElement interface: document.createElement("li") must inherit property "type" with the proper type (1)]
expected: FAIL
diff --git a/tests/wpt/metadata/html/dom/reflection-grouping.html.ini b/tests/wpt/metadata/html/dom/reflection-grouping.html.ini
index 7ecf978bf18..ab78b68717b 100644
--- a/tests/wpt/metadata/html/dom/reflection-grouping.html.ini
+++ b/tests/wpt/metadata/html/dom/reflection-grouping.html.ini
@@ -6303,186 +6303,6 @@
[li.tabIndex: IDL set to -2147483648 followed by getAttribute()]
expected: FAIL
- [li.value: typeof IDL attribute]
- expected: FAIL
-
- [li.value: IDL get with DOM attribute unset]
- expected: FAIL
-
- [li.value: setAttribute() to -36 followed by IDL get]
- expected: FAIL
-
- [li.value: setAttribute() to -1 followed by IDL get]
- expected: FAIL
-
- [li.value: setAttribute() to 0 followed by IDL get]
- expected: FAIL
-
- [li.value: setAttribute() to 1 followed by IDL get]
- expected: FAIL
-
- [li.value: setAttribute() to 2147483647 followed by IDL get]
- expected: FAIL
-
- [li.value: setAttribute() to -2147483648 followed by IDL get]
- expected: FAIL
-
- [li.value: setAttribute() to 2147483648 followed by IDL get]
- expected: FAIL
-
- [li.value: setAttribute() to -2147483649 followed by IDL get]
- expected: FAIL
-
- [li.value: setAttribute() to 4294967295 followed by IDL get]
- expected: FAIL
-
- [li.value: setAttribute() to 4294967296 followed by IDL get]
- expected: FAIL
-
- [li.value: setAttribute() to "" followed by IDL get]
- expected: FAIL
-
- [li.value: setAttribute() to "-1" followed by IDL get]
- expected: FAIL
-
- [li.value: setAttribute() to "-0" followed by IDL get]
- expected: FAIL
-
- [li.value: setAttribute() to "0" followed by IDL get]
- expected: FAIL
-
- [li.value: setAttribute() to "1" followed by IDL get]
- expected: FAIL
-
- [li.value: setAttribute() to " \\0\\x01\\x02\\x03\\x04\\x05\\x06\\x07 \\b\\t\\n\\v\\f\\r\\x0e\\x0f \\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17 \\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f foo " followed by IDL get]
- expected: FAIL
-
- [li.value: setAttribute() to "\\t7" followed by IDL get]
- expected: FAIL
-
- [li.value: setAttribute() to "\\v7" followed by IDL get]
- expected: FAIL
-
- [li.value: setAttribute() to "\\f7" followed by IDL get]
- expected: FAIL
-
- [li.value: setAttribute() to " 7" followed by IDL get]
- expected: FAIL
-
- [li.value: setAttribute() to " 7" followed by IDL get]
- expected: FAIL
-
- [li.value: setAttribute() to "7" followed by IDL get]
- expected: FAIL
-
- [li.value: setAttribute() to "\\n7" followed by IDL get]
- expected: FAIL
-
- [li.value: setAttribute() to "\\r7" followed by IDL get]
- expected: FAIL
-
- [li.value: setAttribute() to "
7" followed by IDL get]
- expected: FAIL
-
- [li.value: setAttribute() to "
7" followed by IDL get]
- expected: FAIL
-
- [li.value: setAttribute() to " 7" followed by IDL get]
- expected: FAIL
-
- [li.value: setAttribute() to "᠎7" followed by IDL get]
- expected: FAIL
-
- [li.value: setAttribute() to " 7" followed by IDL get]
- expected: FAIL
-
- [li.value: setAttribute() to " 7" followed by IDL get]
- expected: FAIL
-
- [li.value: setAttribute() to " 7" followed by IDL get]
- expected: FAIL
-
- [li.value: setAttribute() to " 7" followed by IDL get]
- expected: FAIL
-
- [li.value: setAttribute() to " 7" followed by IDL get]
- expected: FAIL
-
- [li.value: setAttribute() to " 7" followed by IDL get]
- expected: FAIL
-
- [li.value: setAttribute() to " 7" followed by IDL get]
- expected: FAIL
-
- [li.value: setAttribute() to " 7" followed by IDL get]
- expected: FAIL
-
- [li.value: setAttribute() to " 7" followed by IDL get]
- expected: FAIL
-
- [li.value: setAttribute() to " 7" followed by IDL get]
- expected: FAIL
-
- [li.value: setAttribute() to " 7" followed by IDL get]
- expected: FAIL
-
- [li.value: setAttribute() to " 7" followed by IDL get]
- expected: FAIL
-
- [li.value: setAttribute() to " 7" followed by IDL get]
- expected: FAIL
-
- [li.value: setAttribute() to undefined followed by IDL get]
- expected: FAIL
-
- [li.value: setAttribute() to 1.5 followed by IDL get]
- expected: FAIL
-
- [li.value: setAttribute() to true followed by IDL get]
- expected: FAIL
-
- [li.value: setAttribute() to false followed by IDL get]
- expected: FAIL
-
- [li.value: setAttribute() to object "[object Object\]" followed by IDL get]
- expected: FAIL
-
- [li.value: setAttribute() to NaN followed by IDL get]
- expected: FAIL
-
- [li.value: setAttribute() to Infinity followed by IDL get]
- expected: FAIL
-
- [li.value: setAttribute() to -Infinity followed by IDL get]
- expected: FAIL
-
- [li.value: setAttribute() to "\\0" followed by IDL get]
- expected: FAIL
-
- [li.value: setAttribute() to object "2" followed by IDL get]
- expected: FAIL
-
- [li.value: setAttribute() to object "3" followed by IDL get]
- expected: FAIL
-
- [li.value: IDL set to -36 followed by getAttribute()]
- expected: FAIL
-
- [li.value: IDL set to -1 followed by getAttribute()]
- expected: FAIL
-
- [li.value: IDL set to 0 followed by getAttribute()]
- expected: FAIL
-
- [li.value: IDL set to 1 followed by getAttribute()]
- expected: FAIL
-
- [li.value: IDL set to 2147483647 followed by getAttribute()]
- expected: FAIL
-
- [li.value: IDL set to -2147483648 followed by getAttribute()]
- expected: FAIL
-
[li.type: typeof IDL attribute]
expected: FAIL
diff --git a/tests/wpt/metadata/html/semantics/grouping-content/the-li-element/grouping-li.html.ini b/tests/wpt/metadata/html/semantics/grouping-content/the-li-element/grouping-li.html.ini
index ea4e02e4cac..57509d09e74 100644
--- a/tests/wpt/metadata/html/semantics/grouping-content/the-li-element/grouping-li.html.ini
+++ b/tests/wpt/metadata/html/semantics/grouping-content/the-li-element/grouping-li.html.ini
@@ -3,33 +3,3 @@
[li should have a 'value' attribute]
expected: FAIL
- [Default (unspecified) value of value is 0.]
- expected: FAIL
-
- [.value property reflects content attribute - and both parse value of '2' correctly.]
- expected: FAIL
-
- [IDL and content attribute parse value of '-10' correctly.]
- expected: FAIL
-
- [IDL and content attribute parse value of '4.03' correctly.]
- expected: FAIL
-
- [IDL and content attribute parse value of '-4.03' correctly.]
- expected: FAIL
-
- [IDL and content attribute parse value of '4.9' correctly.]
- expected: FAIL
-
- [IDL and content attribute parse value of '-4.9' correctly.]
- expected: FAIL
-
- [IDL and content attribute parse value of '7e2' correctly.]
- expected: FAIL
-
- [IDL and content attribute parse value of '.5' correctly.]
- expected: FAIL
-
- [IDL and content attribute parse value of 'A' correctly.]
- expected: FAIL
-