diff options
168 files changed, 2082 insertions, 1340 deletions
diff --git a/HACKING_QUICKSTART.md b/HACKING_QUICKSTART.md index 84c206650f1..ee71606b33c 100644 --- a/HACKING_QUICKSTART.md +++ b/HACKING_QUICKSTART.md @@ -159,7 +159,7 @@ Using `RUST_LOG="debug"` is usually the very first thing you might want to do if RUST_LOG="debug" ./mach run -d -- -i -y 1 -t 1 /tmp/a.html 2>&1 | ts -s "%.S: " | tee /tmp/log.txt ``` -You can filter by crate or module, for example `RUST_LOG="layout::inline=debug" ./mach run …`. This is documented at https://rust-lang.github.io/log/env_logger/. +You can filter by crate or module, for example `RUST_LOG="layout::inline=debug" ./mach run …`. Check the [env_logger](http://doc.rust-lang.org/log/env_logger/index.html) documentation for more details. Use `RUST_BACKTRACE=1` to dump the backtrace when Servo panics. diff --git a/components/canvas/Cargo.toml b/components/canvas/Cargo.toml index 48999b5923f..07540b3f83c 100644 --- a/components/canvas/Cargo.toml +++ b/components/canvas/Cargo.toml @@ -39,4 +39,4 @@ cssparser = { version = "0.4", features = [ "serde-serialization" ] } log = "0.3" num = "0.1.24" gleam = "0.1" -euclid = {version = "0.3", features = ["plugins"]} +euclid = {version = "0.4", features = ["plugins"]} diff --git a/components/canvas/webgl_paint_task.rs b/components/canvas/webgl_paint_task.rs index 28fabacf72e..f6c5553b424 100644 --- a/components/canvas/webgl_paint_task.rs +++ b/components/canvas/webgl_paint_task.rs @@ -72,6 +72,8 @@ impl WebGLPaintTask { gl::attach_shader(program_id, shader_id), CanvasWebGLMsg::BufferData(buffer_type, data, usage) => gl::buffer_data(buffer_type, &data, usage), + CanvasWebGLMsg::BufferSubData(buffer_type, offset, data) => + gl::buffer_sub_data(buffer_type, offset, &data), CanvasWebGLMsg::Clear(mask) => gl::clear(mask), CanvasWebGLMsg::ClearColor(r, g, b, a) => diff --git a/components/canvas_traits/Cargo.toml b/components/canvas_traits/Cargo.toml index f46adfba765..2ab3a3da631 100644 --- a/components/canvas_traits/Cargo.toml +++ b/components/canvas_traits/Cargo.toml @@ -36,6 +36,6 @@ path = "../util" [dependencies] cssparser = { version = "0.4", features = [ "serde-serialization" ] } -euclid = {version = "0.3", features = ["plugins"]} +euclid = {version = "0.4", features = ["plugins"]} serde_macros = "0.6" diff --git a/components/canvas_traits/lib.rs b/components/canvas_traits/lib.rs index b68ab5d53f0..305704b584d 100644 --- a/components/canvas_traits/lib.rs +++ b/components/canvas_traits/lib.rs @@ -128,6 +128,7 @@ pub enum CanvasWebGLMsg { BlendFuncSeparate(u32, u32, u32, u32), AttachShader(u32, u32), BufferData(u32, Vec<f32>, u32), + BufferSubData(u32, isize, Vec<f32>), Clear(u32), ClearColor(f32, f32, f32, f32), ClearDepth(f64), diff --git a/components/compositing/Cargo.toml b/components/compositing/Cargo.toml index 0fb996165a4..e076bef55ad 100644 --- a/components/compositing/Cargo.toml +++ b/components/compositing/Cargo.toml @@ -75,13 +75,13 @@ log = "0.3" num = "0.1.24" time = "0.1.17" gleam = "0.1" -euclid = {version = "0.3", features = ["plugins"]} +euclid = {version = "0.4", features = ["plugins"]} serde = "0.6" serde_macros = "0.6" url = "0.5" [target.x86_64-apple-darwin.dependencies] -core-graphics = "0.1" +core-graphics = "0.2" [target.x86_64-apple-darwin.dependencies.core-text] git = "https://github.com/servo/core-text-rs" diff --git a/components/gfx/Cargo.toml b/components/gfx/Cargo.toml index c5758e4257d..43eb0ce75b0 100644 --- a/components/gfx/Cargo.toml +++ b/components/gfx/Cargo.toml @@ -11,7 +11,7 @@ path = "lib.rs" [dependencies] app_units = {version = "0.1", features = ["plugins"]} bitflags = "0.3" -euclid = {version = "0.3", features = ["plugins"]} +euclid = {version = "0.4", features = ["plugins"]} fnv = "1.0" harfbuzz-sys = "0.1" lazy_static = "0.1" @@ -26,6 +26,7 @@ string_cache = "0.2" time = "0.1.12" unicode-script = { version = "0.1", features = ["harfbuzz"] } url = "0.5" +servo-skia = "0.20130412.0" [dependencies.plugins] path = "../plugins" @@ -59,9 +60,6 @@ features = ["plugins"] git = "https://github.com/servo/rust-layers" features = ["plugins"] -[dependencies.skia] -git = "https://github.com/servo/skia" - [dependencies.script_traits] path = "../script_traits" @@ -69,23 +67,23 @@ path = "../script_traits" git = "https://github.com/servo/ipc-channel" [target.x86_64-apple-darwin.dependencies] -core-foundation = "0.1" -core-graphics = "0.1" +core-foundation = "0.2" +core-graphics = "0.2" -[target.i686-unknown-linux-gnu.dependencies.fontconfig] -git = "https://github.com/servo/rust-fontconfig" +[target.i686-unknown-linux-gnu.dependencies] +servo-fontconfig = "0.2" -[target.x86_64-unknown-linux-gnu.dependencies.fontconfig] -git = "https://github.com/servo/rust-fontconfig" +[target.x86_64-unknown-linux-gnu.dependencies] +servo-fontconfig = "0.2" -[target.arm-unknown-linux-gnueabihf.dependencies.fontconfig] -git = "https://github.com/servo/rust-fontconfig" +[target.arm-unknown-linux-gnueabihf.dependencies] +servo-fontconfig = "0.2" -[target.aarch64-unknown-linux-gnu.dependencies.fontconfig] -git = "https://github.com/servo/rust-fontconfig" +[target.aarch64-unknown-linux-gnu.dependencies] +servo-fontconfig = "0.2" -[target.arm-linux-androideabi.dependencies.fontconfig] -git = "https://github.com/servo/rust-fontconfig" +[target.arm-linux-androideabi.dependencies] +servo-fontconfig = "0.2" [target.i686-unknown-linux-gnu.dependencies.freetype] git = "https://github.com/servo/rust-freetype" diff --git a/components/gfx/display_list/mod.rs b/components/gfx/display_list/mod.rs index 3f03ecf88ef..b1220e8bc9c 100644 --- a/components/gfx/display_list/mod.rs +++ b/components/gfx/display_list/mod.rs @@ -43,7 +43,7 @@ use style::properties::ComputedValues; use text::TextRun; use text::glyph::CharIndex; use util::cursor::Cursor; -use util::geometry::{self, MAX_RECT, ZERO_RECT}; +use util::geometry::{self, MAX_RECT}; use util::linked_list::prepend_from; use util::mem::HeapSizeOf; use util::opts; @@ -1043,7 +1043,7 @@ impl ClippingRegion { #[inline] pub fn empty() -> ClippingRegion { ClippingRegion { - main: ZERO_RECT, + main: Rect::zero(), complex: Vec::new(), } } @@ -1073,7 +1073,7 @@ impl ClippingRegion { #[inline] pub fn intersect_rect(self, rect: &Rect<Au>) -> ClippingRegion { ClippingRegion { - main: self.main.intersection(rect).unwrap_or(ZERO_RECT), + main: self.main.intersection(rect).unwrap_or(Rect::zero()), complex: self.complex, } } diff --git a/components/gfx/paint_context.rs b/components/gfx/paint_context.rs index 5c7eb8c2016..33422fe076a 100644 --- a/components/gfx/paint_context.rs +++ b/components/gfx/paint_context.rs @@ -35,7 +35,7 @@ use std::{f32, mem, ptr}; use style::computed_values::{border_style, filter, image_rendering, mix_blend_mode}; use text::TextRun; use text::glyph::CharIndex; -use util::geometry::{self, MAX_RECT, PagePx, ScreenPx, ZERO_POINT, ZERO_RECT}; +use util::geometry::{self, MAX_RECT, PagePx, ScreenPx, ZERO_POINT}; use util::opts; use util::range::Range; @@ -1580,7 +1580,7 @@ impl<'a> PaintContext<'a> { let side_inflation = blur_radius * BLUR_INFLATION_FACTOR; let tile_box_bounds = geometry::f32_rect_to_au_rect(self.page_rect.to_untyped()).intersection(box_bounds) - .unwrap_or(ZERO_RECT) + .unwrap_or(Rect::zero()) .inflate(side_inflation, side_inflation); TemporaryDrawTarget::from_bounds(&self.draw_target, &tile_box_bounds) } diff --git a/components/layout/Cargo.toml b/components/layout/Cargo.toml index 304517cb346..0a54158144c 100644 --- a/components/layout/Cargo.toml +++ b/components/layout/Cargo.toml @@ -71,7 +71,7 @@ libc = "0.2" selectors = "0.2" smallvec = "0.1" string_cache = "0.2" -euclid = {version = "0.3", features = ["plugins"]} +euclid = {version = "0.4", features = ["plugins"]} serde = "0.6" serde_macros = "0.6" serde_json = "0.5" diff --git a/components/layout/flow.rs b/components/layout/flow.rs index 3af799fc82e..0df6a7bd1d0 100644 --- a/components/layout/flow.rs +++ b/components/layout/flow.rs @@ -56,7 +56,6 @@ use table_colgroup::TableColGroupFlow; use table_row::TableRowFlow; use table_rowgroup::TableRowGroupFlow; use table_wrapper::TableWrapperFlow; -use util::geometry::ZERO_RECT; use util::logical_geometry::{LogicalRect, LogicalSize, WritingMode}; use util::print_tree::PrintTree; use wrapper::{PseudoElementType, ThreadSafeLayoutNode}; @@ -1054,7 +1053,7 @@ impl BaseFlow { children: FlowList::new(), intrinsic_inline_sizes: IntrinsicISizes::new(), position: LogicalRect::zero(writing_mode), - overflow: ZERO_RECT, + overflow: Rect::zero(), parallel: FlowParallelInfo::new(), floats: Floats::new(writing_mode), collapsible_margins: CollapsibleMargins::new(), diff --git a/components/layout/inline.rs b/components/layout/inline.rs index 15c1beae31b..232de1bb5f2 100644 --- a/components/layout/inline.rs +++ b/components/layout/inline.rs @@ -31,7 +31,6 @@ use style::values::computed::LengthOrPercentage; use text; use unicode_bidi; use util; -use util::geometry::ZERO_RECT; use util::logical_geometry::{LogicalRect, LogicalSize, WritingMode}; use util::print_tree::PrintTree; use util::range::{Range, RangeIndex}; @@ -1749,7 +1748,7 @@ impl Flow for InlineFlow { fn repair_style(&mut self, _: &Arc<ComputedValues>) {} fn compute_overflow(&self) -> Rect<Au> { - let mut overflow = ZERO_RECT; + let mut overflow = Rect::zero(); let flow_size = self.base.position.size.to_physical(self.base.writing_mode); let relative_containing_block_size = &self.base.early_absolute_position_info.relative_containing_block_size; diff --git a/components/layout/table_colgroup.rs b/components/layout/table_colgroup.rs index 12273d0e173..4b6dd537fe0 100644 --- a/components/layout/table_colgroup.rs +++ b/components/layout/table_colgroup.rs @@ -17,7 +17,6 @@ use std::fmt; use std::sync::Arc; use style::properties::ComputedValues; use style::values::computed::LengthOrPercentageOrAuto; -use util::geometry::ZERO_RECT; use util::logical_geometry::LogicalSize; /// A table formatting context. @@ -96,7 +95,7 @@ impl Flow for TableColGroupFlow { fn repair_style(&mut self, _: &Arc<ComputedValues>) {} fn compute_overflow(&self) -> Rect<Au> { - ZERO_RECT + Rect::zero() } fn generated_containing_block_size(&self, _: OpaqueFlow) -> LogicalSize<Au> { diff --git a/components/layout_traits/Cargo.toml b/components/layout_traits/Cargo.toml index f63b00c794b..9bfaafa228e 100644 --- a/components/layout_traits/Cargo.toml +++ b/components/layout_traits/Cargo.toml @@ -29,7 +29,7 @@ path = "../util" git = "https://github.com/servo/ipc-channel" [dependencies] -euclid = {version = "0.3", features = ["plugins"]} +euclid = {version = "0.4", features = ["plugins"]} serde = "0.6" serde_macros = "0.6" url = "0.5" diff --git a/components/msg/Cargo.toml b/components/msg/Cargo.toml index 9da2435a5a2..f933b405b1e 100644 --- a/components/msg/Cargo.toml +++ b/components/msg/Cargo.toml @@ -39,13 +39,11 @@ app_units = {version = "0.1", features = ["plugins"]} bitflags = "0.3" hyper = { version = "0.7", features = [ "serde-serialization" ] } rustc-serialize = "0.3.4" -euclid = {version = "0.3", features = ["plugins"]} +euclid = {version = "0.4", features = ["plugins"]} serde = "0.6" serde_macros = "0.6" url = "0.5" [target.x86_64-apple-darwin.dependencies] -core-foundation = "0.1" - -[target.x86_64-apple-darwin.dependencies.io-surface] -git = "https://github.com/servo/io-surface-rs" +core-foundation = "0.2" +io-surface = "0.1.0" diff --git a/components/net/Cargo.toml b/components/net/Cargo.toml index 9e550a14b40..7029d9ef0e1 100644 --- a/components/net/Cargo.toml +++ b/components/net/Cargo.toml @@ -38,5 +38,5 @@ cookie = "0.2" mime_guess = "1.1.1" flate2 = "0.2.0" uuid = "0.1.16" -euclid = {version = "0.3", features = ["plugins"]} +euclid = {version = "0.4", features = ["plugins"]} url = "0.5" diff --git a/components/net_traits/Cargo.toml b/components/net_traits/Cargo.toml index 9b0824caf03..0822ff7054d 100644 --- a/components/net_traits/Cargo.toml +++ b/components/net_traits/Cargo.toml @@ -24,7 +24,7 @@ path = "../plugins" [dependencies] log = "0.3" -euclid = {version = "0.3", features = ["plugins"]} +euclid = {version = "0.4", features = ["plugins"]} hyper = { version = "0.7", features = [ "serde-serialization" ] } image = "0.5.0" serde = "0.6" diff --git a/components/script/Cargo.toml b/components/script/Cargo.toml index 06e5f325ccc..135a62ccc07 100644 --- a/components/script/Cargo.toml +++ b/components/script/Cargo.toml @@ -81,10 +81,11 @@ smallvec = "0.1" html5ever = { version = "0.2.1", features = ["unstable"] } selectors = "0.2" string_cache = { version = "0.2", features = ["unstable"] } -euclid = {version = "0.3", features = ["plugins"]} +euclid = {version = "0.4", features = ["plugins"]} tendril = "0.1.1" rand = "0.3" serde = "0.6" caseless = "0.1.0" image = "0.5.0" url = "0.5" +ref_slice = "0.1.0" diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py index eaf2bbe0fe7..d88e6d9fa32 100644 --- a/components/script/dom/bindings/codegen/CodegenRust.py +++ b/components/script/dom/bindings/codegen/CodegenRust.py @@ -21,7 +21,12 @@ from WebIDL import ( IDLUndefinedValue, ) -from Configuration import getTypesFromDescriptor, getTypesFromDictionary, getTypesFromCallback +from Configuration import ( + MemberIsUnforgeable, + getTypesFromCallback, + getTypesFromDescriptor, + getTypesFromDictionary, +) AUTOGENERATED_WARNING_COMMENT = \ "/* THIS FILE IS AUTOGENERATED - DO NOT EDIT */\n\n" @@ -1380,7 +1385,8 @@ class MethodDefiner(PropertyDefiner): """ A class for defining methods on a prototype object. """ - def __init__(self, descriptor, name, static): + def __init__(self, descriptor, name, static, unforgeable): + assert not (static and unforgeable) PropertyDefiner.__init__(self, descriptor, name) # FIXME https://bugzilla.mozilla.org/show_bug.cgi?id=772822 @@ -1391,36 +1397,40 @@ class MethodDefiner(PropertyDefiner): if not descriptor.interface.isCallback() or static: methods = [m for m in descriptor.interface.members if m.isMethod() and m.isStatic() == static and - not m.isIdentifierLess()] + not m.isIdentifierLess() and + MemberIsUnforgeable(m, descriptor) == unforgeable] else: methods = [] self.regular = [{"name": m.identifier.name, "methodInfo": not m.isStatic(), - "length": methodLength(m), - "flags": "JSPROP_ENUMERATE"} for m in methods] + "length": methodLength(m)} for m in methods] # FIXME Check for an existing iterator on the interface first. if any(m.isGetter() and m.isIndexed() for m in methods): self.regular.append({"name": '@@iterator', "methodInfo": False, "selfHostedName": "ArrayValues", - "length": 0, - "flags": "JSPROP_ENUMERATE"}) + "length": 0}) - if not static: + isUnforgeableInterface = bool(descriptor.interface.getExtendedAttribute("Unforgeable")) + if not static and unforgeable == isUnforgeableInterface: stringifier = descriptor.operations['Stringifier'] if stringifier: self.regular.append({ "name": "toString", "nativeName": stringifier.identifier.name, "length": 0, - "flags": "JSPROP_ENUMERATE" }) + self.unforgeable = unforgeable def generateArray(self, array, name): if len(array) == 0: return "" + flags = "JSPROP_ENUMERATE" + if self.unforgeable: + flags += " | JSPROP_PERMANENT | JSPROP_READONLY" + def specData(m): # TODO: Use something like JS_FNSPEC # https://github.com/servo/servo/issues/6391 @@ -1444,16 +1454,16 @@ class MethodDefiner(PropertyDefiner): accessor = 'Some(%s)' % m.get("nativeName", m["name"]) if m["name"].startswith("@@"): return ('(SymbolCode::%s as i32 + 1)' - % m["name"][2:], accessor, jitinfo, m["length"], m["flags"], selfHostedName) - return (str_to_const_array(m["name"]), accessor, jitinfo, m["length"], m["flags"], selfHostedName) + % m["name"][2:], accessor, jitinfo, m["length"], flags, selfHostedName) + return (str_to_const_array(m["name"]), accessor, jitinfo, m["length"], flags, selfHostedName) return self.generatePrefableArray( array, name, ' JSFunctionSpec {\n' ' name: %s as *const u8 as *const libc::c_char,\n' - ' call: JSNativeWrapper {op: %s, info: %s},\n' + ' call: JSNativeWrapper { op: %s, info: %s },\n' ' nargs: %s,\n' - ' flags: %s as u16,\n' + ' flags: (%s) as u16,\n' ' selfHostedName: %s\n' ' }', ' JSFunctionSpec {\n' @@ -1468,23 +1478,27 @@ class MethodDefiner(PropertyDefiner): class AttrDefiner(PropertyDefiner): - def __init__(self, descriptor, name, static): + def __init__(self, descriptor, name, static, unforgeable): + assert not (static and unforgeable) PropertyDefiner.__init__(self, descriptor, name) self.name = name self.descriptor = descriptor self.regular = [ m - for m in descriptor.interface.members - if m.isAttr() and m.isStatic() == static + for m in descriptor.interface.members if + m.isAttr() and m.isStatic() == static and + MemberIsUnforgeable(m, descriptor) == unforgeable ] self.static = static + self.unforgeable = unforgeable def generateArray(self, array, name): if len(array) == 0: return "" - def flags(attr): - return "JSPROP_SHARED | JSPROP_ENUMERATE" + flags = "JSPROP_ENUMERATE | JSPROP_SHARED" + if self.unforgeable: + flags += " | JSPROP_READONLY | JSPROP_PERMANENT" def getter(attr): if self.static: @@ -1520,7 +1534,7 @@ class AttrDefiner(PropertyDefiner): "native": accessor}) def specData(attr): - return (str_to_const_array(attr.identifier.name), flags(attr), getter(attr), + return (str_to_const_array(attr.identifier.name), flags, getter(attr), setter(attr)) return self.generatePrefableArray( @@ -1844,10 +1858,16 @@ class CGPrototypeJSClass(CGThing): self.descriptor = descriptor def define(self): + name = str_to_const_array(self.descriptor.interface.identifier.name + "Prototype") + slotCount = 0 + if self.descriptor.hasUnforgeableMembers: + slotCount += 1 return """\ static PrototypeClass: JSClass = JSClass { - name: %s as *const u8 as *const libc::c_char, - flags: 0, + name: %(name)s as *const u8 as *const libc::c_char, + flags: + // JSCLASS_HAS_RESERVED_SLOTS(%(slotCount)s) + (%(slotCount)s & JSCLASS_RESERVED_SLOTS_MASK) << JSCLASS_RESERVED_SLOTS_SHIFT, addProperty: None, delProperty: None, getProperty: None, @@ -1862,7 +1882,7 @@ static PrototypeClass: JSClass = JSClass { trace: None, reserved: [0 as *mut libc::c_void; 25] }; -""" % str_to_const_array(self.descriptor.interface.identifier.name + "Prototype") +""" % {'name': name, 'slotCount': slotCount} class CGInterfaceObjectJSClass(CGThing): @@ -2181,6 +2201,68 @@ JS_SetReservedSlot(obj.ptr, DOM_WEAK_SLOT, PrivateValue(ptr::null()));""" return create +def InitUnforgeablePropertiesOnHolder(descriptor, properties): + """ + Define the unforgeable properties on the unforgeable holder for + the interface represented by descriptor. + + properties is a PropertyArrays instance. + """ + unforgeables = [] + + defineUnforgeableAttrs = "define_properties(cx, unforgeable_holder.handle(), %s).unwrap();" + defineUnforgeableMethods = "define_methods(cx, unforgeable_holder.handle(), %s).unwrap();" + + unforgeableMembers = [ + (defineUnforgeableAttrs, properties.unforgeable_attrs), + (defineUnforgeableMethods, properties.unforgeable_methods), + ] + for template, array in unforgeableMembers: + if array.length() > 0: + unforgeables.append(CGGeneric(template % array.variableName())) + return CGList(unforgeables, "\n") + + +def CopyUnforgeablePropertiesToInstance(descriptor): + """ + Copy the unforgeable properties from the unforgeable holder for + this interface to the instance object we have. + """ + if not descriptor.hasUnforgeableMembers: + return "" + copyCode = "" + + # For proxies, we want to define on the expando object, not directly on the + # reflector, so we can make sure we don't get confused by named getters. + if descriptor.proxy: + copyCode += """\ +let mut expando = RootedObject::new(cx, ptr::null_mut()); +{ + let _ac = JSAutoCompartment::new(cx, scope.get()); + expando.handle_mut().set(ensure_expando_object(cx, obj.handle())); +} +""" + obj = "expando" + else: + obj = "obj" + + # We can't do the fast copy for globals, because we can't allocate the + # unforgeable holder for those with the right JSClass. Luckily, there + # aren't too many globals being created. + if descriptor.isGlobal(): + copyFunc = "JS_CopyPropertiesFrom" + else: + copyFunc = "JS_InitializePropertiesFromCompatibleNativeObject" + copyCode += """\ +let mut unforgeable_holder = RootedObject::new(cx, ptr::null_mut()); +unforgeable_holder.handle_mut().set( + JS_GetReservedSlot(proto.ptr, DOM_PROTO_UNFORGEABLE_HOLDER_SLOT).to_object()); +assert!(%(copyFunc)s(cx, %(obj)s.handle(), unforgeable_holder.handle())); +""" % {'copyFunc': copyFunc, 'obj': obj} + + return copyCode + + class CGWrapMethod(CGAbstractMethod): """ Class that generates the FooBinding::Wrap function for non-callback @@ -2199,7 +2281,9 @@ class CGWrapMethod(CGAbstractMethod): pub=True, unsafe=True) def definition_body(self): + unforgeable = CopyUnforgeablePropertiesToInstance(self.descriptor) if not self.descriptor.isGlobal(): + create = CreateBindingJSObject(self.descriptor, "scope") return CGGeneric("""\ let _ar = JSAutoRequest::new(cx); let scope = scope.reflector().get_jsobject(); @@ -2213,28 +2297,31 @@ let mut proto = RootedObject::new(cx, ptr::null_mut()); } assert!(!proto.ptr.is_null()); -%s +%(createObject)s +%(copyUnforgeable)s (*raw).init_reflector(obj.ptr); -Root::from_ref(&*raw)""" % CreateBindingJSObject(self.descriptor, "scope")) +Root::from_ref(&*raw)""" % {'copyUnforgeable': unforgeable, 'createObject': create}) else: + create = CreateBindingJSObject(self.descriptor) return CGGeneric("""\ let _ar = JSAutoRequest::new(cx); -%s +%(createObject)s let _ac = JSAutoCompartment::new(cx, obj.ptr); let mut proto = RootedObject::new(cx, ptr::null_mut()); GetProtoObject(cx, obj.handle(), obj.handle(), proto.handle_mut()); JS_SetPrototype(cx, obj.handle(), proto.handle()); +%(copyUnforgeable)s (*raw).init_reflector(obj.ptr); let ret = Root::from_ref(&*raw); RegisterBindings::Register(cx, obj.handle()); -ret""" % CreateBindingJSObject(self.descriptor)) +ret""" % {'copyUnforgeable': unforgeable, 'createObject': create}) class CGIDLInterface(CGThing): @@ -2279,17 +2366,29 @@ class CGAbstractExternMethod(CGAbstractMethod): class PropertyArrays(): def __init__(self, descriptor): self.static_methods = MethodDefiner(descriptor, "StaticMethods", - static=True) + static=True, unforgeable=False) self.static_attrs = AttrDefiner(descriptor, "StaticAttributes", - static=True) - self.methods = MethodDefiner(descriptor, "Methods", static=False) - self.attrs = AttrDefiner(descriptor, "Attributes", static=False) + static=True, unforgeable=False) + self.methods = MethodDefiner(descriptor, "Methods", static=False, unforgeable=False) + self.unforgeable_methods = MethodDefiner(descriptor, "UnforgeableMethods", + static=False, unforgeable=True) + self.attrs = AttrDefiner(descriptor, "Attributes", static=False, unforgeable=False) + self.unforgeable_attrs = AttrDefiner(descriptor, "UnforgeableAttributes", + static=False, unforgeable=True) self.consts = ConstDefiner(descriptor, "Constants") pass @staticmethod def arrayNames(): - return ["static_methods", "static_attrs", "methods", "attrs", "consts"] + return [ + "static_methods", + "static_attrs", + "methods", + "unforgeable_methods", + "attrs", + "unforgeable_attrs", + "consts", + ] def variableNames(self): names = {} @@ -2392,10 +2491,54 @@ let named_constructors: [(NonNullJSNative, &'static str, u32); %d] = [ createArray += "," createArray += "];" + if self.descriptor.hasUnforgeableMembers: + # We want to use the same JSClass and prototype as the object we'll + # end up defining the unforgeable properties on in the end, so that + # we can use JS_InitializePropertiesFromCompatibleNativeObject to do + # a fast copy. In the case of proxies that's null, because the + # expando object is a vanilla object, but in the case of other DOM + # objects it's whatever our class is. + # + # Also, for a global we can't use the global's class; just use + # nullpr and when we do the copy off the holder we'll take a slower + # path. This also means that we don't need to worry about matching + # the prototype. + if self.descriptor.proxy or self.descriptor.isGlobal(): + holderClass = "ptr::null()" + holderProto = "ptr::null_mut()" + else: + holderClass = "&Class.base as *const js::jsapi::Class as *const JSClass" + holderProto = "rval.get()" + # JS_NewObjectWithoutMetadata() is unsafe. + self.unsafe = True + createUnforgeableHolder = CGGeneric(""" +let mut unforgeable_holder = RootedObject::new(cx, ptr::null_mut()); +{ + let holder_class = %(holderClass)s; + let holder_proto = RootedObject::new(cx, %(holderProto)s); + unforgeable_holder.handle_mut().set( + JS_NewObjectWithoutMetadata(cx, holder_class, holder_proto.handle())); + assert!(!unforgeable_holder.ptr.is_null()); +}""" % {'holderClass': holderClass, 'holderProto': holderProto}) + defineUnforgeables = InitUnforgeablePropertiesOnHolder(self.descriptor, + self.properties) + createUnforgeableHolder = CGList( + [createUnforgeableHolder, defineUnforgeables], "\n") + + installUnforgeableHolder = CGGeneric("""\ +JS_SetReservedSlot(rval.get(), DOM_PROTO_UNFORGEABLE_HOLDER_SLOT, + ObjectValue(&*unforgeable_holder.ptr))""") + + unforgeableHolderSetup = CGList( + [createUnforgeableHolder, installUnforgeableHolder], "\n") + else: + unforgeableHolderSetup = None + return CGList([ CGGeneric(getParentProto), CGGeneric(createArray), - CGGeneric(call % self.properties.variableNames()) + CGGeneric(call % self.properties.variableNames()), + unforgeableHolderSetup, ], "\n") @@ -4269,6 +4412,9 @@ class CGDOMJSProxyHandler_defineProperty(CGAbstractExternMethod): namedSetter = self.descriptor.operations['NamedSetter'] if namedSetter: + if self.descriptor.hasUnforgeableMembers: + raise TypeError("Can't handle a named setter on an interface that has " + "unforgeables. Figure out how that should work!") set += ("if RUST_JSID_IS_STRING(id) {\n" + CGIndenter(CGProxyNamedSetter(self.descriptor)).define() + " (*opresult).code_ = 0; /* SpecialCodes::OkCode */\n" + @@ -4308,6 +4454,9 @@ class CGDOMJSProxyHandler_delete(CGAbstractExternMethod): def getBody(self): set = "" if self.descriptor.operations['NamedDeleter']: + if self.descriptor.hasUnforgeableMembers: + raise TypeError("Can't handle a deleter on an interface that has " + "unforgeables. Figure out how that should work!") set += CGProxyNamedDeleter(self.descriptor).define() set += "return proxyhandler::delete(%s);" % ", ".join(a.name for a in self.args) return set @@ -4422,7 +4571,7 @@ return true;""" class CGDOMJSProxyHandler_get(CGAbstractExternMethod): def __init__(self, descriptor): args = [Argument('*mut JSContext', 'cx'), Argument('HandleObject', 'proxy'), - Argument('HandleObject', '_receiver'), Argument('HandleId', 'id'), + Argument('HandleObject', 'receiver'), Argument('HandleId', 'id'), Argument('MutableHandleValue', 'vp')] CGAbstractExternMethod.__init__(self, descriptor, "get", "bool", args) self.descriptor = descriptor @@ -4437,7 +4586,7 @@ if !expando.ptr.is_null() { } if hasProp { - return JS_GetPropertyById(cx, expando.handle(), id, vp); + return JS_ForwardGetPropertyTo(cx, expando.handle(), id, receiver, vp); } }""" @@ -4554,7 +4703,10 @@ if !weak_box_ptr.is_null() { } """ % descriptor.concreteType release += """\ -let _ = Box::from_raw(this as *mut %s); +if !this.is_null() { + // The pointer can be null if the object is the unforgeable holder of that interface. + let _ = Box::from_raw(this as *mut %s); +} debug!("%s finalize: {:p}", this);\ """ % (descriptor.concreteType, descriptor.concreteType) return release @@ -5177,30 +5329,31 @@ class CGBindingRoot(CGThing): # Add imports curr = CGImports(curr, descriptors + callbackDescriptors, mainCallbacks, [ 'js', - 'js::JS_CALLEE', - 'js::{JSCLASS_GLOBAL_SLOT_COUNT, JSCLASS_IS_DOMJSCLASS, JSCLASS_IMPLEMENTS_BARRIERS}', - 'js::{JSCLASS_IS_GLOBAL, JSCLASS_RESERVED_SLOTS_SHIFT}', - 'js::{JSCLASS_RESERVED_SLOTS_MASK}', - 'js::{JSPROP_ENUMERATE, JSPROP_SHARED}', - 'js::{JSITER_OWNONLY, JSITER_HIDDEN, JSITER_SYMBOLS}', + 'js::{JSCLASS_GLOBAL_SLOT_COUNT, JSCLASS_IMPLEMENTS_BARRIERS}', + 'js::{JSCLASS_IS_DOMJSCLASS, JSCLASS_IS_GLOBAL, JSCLASS_RESERVED_SLOTS_MASK}', + 'js::{JSCLASS_RESERVED_SLOTS_SHIFT, JSITER_HIDDEN, JSITER_OWNONLY}', + 'js::{JSITER_SYMBOLS, JSPROP_ENUMERATE, JSPROP_PERMANENT, JSPROP_READONLY}', + 'js::{JSPROP_SHARED, JS_CALLEE}', 'js::error::throw_type_error', - 'js::jsapi::{JS_CallFunctionValue, JS_GetClass, JS_GetGlobalForObject}', - 'js::jsapi::{JS_GetObjectPrototype, JS_GetProperty, JS_GetPropertyById}', - 'js::jsapi::{JS_GetPropertyDescriptorById, JS_GetReservedSlot}', - 'js::jsapi::{JS_HasProperty, JS_HasPropertyById, JS_IsExceptionPending}', - 'js::jsapi::{JS_NewObjectWithGivenProto, JS_NewObject, IsCallable, JS_SetProperty, JS_SetPrototype}', - 'js::jsapi::{JS_SetReservedSlot, JS_WrapValue, JSContext}', - 'js::jsapi::{JSClass, FreeOp, JSFreeOp, JSFunctionSpec, jsid}', - 'js::jsapi::{MutableHandleValue, MutableHandleObject, HandleObject, HandleValue, RootedObject}', - 'js::jsapi::{RootedValue, JSNativeWrapper, JSNative, JSObject, JSPropertyDescriptor}', - 'js::jsapi::{RootedId, JS_InternString, RootedString, INTERNED_STRING_TO_JSID}', - 'js::jsapi::{JSPropertySpec}', - 'js::jsapi::{JSString, JSTracer, JSJitInfo, JSTypedMethodJitInfo, OpType, AliasSet, ArgType}', - 'js::jsapi::{MutableHandle, Handle, HandleId, JSType, JSValueType}', - 'js::jsapi::{SymbolCode, ObjectOpResult, HandleValueArray}', - 'js::jsapi::{JSJitGetterCallArgs, JSJitSetterCallArgs, JSJitMethodCallArgs, CallArgs}', - 'js::jsapi::{JSAutoCompartment, JSAutoRequest, JS_ComputeThis}', - 'js::jsapi::{GetGlobalForObjectCrossCompartment, AutoIdVector, GetPropertyKeys}', + 'js::jsapi::{AliasSet, ArgType, AutoIdVector, CallArgs, FreeOp}', + 'js::jsapi::{GetGlobalForObjectCrossCompartment , GetPropertyKeys, Handle}', + 'js::jsapi::{HandleId, HandleObject, HandleValue, HandleValueArray}', + 'js::jsapi::{INTERNED_STRING_TO_JSID, IsCallable, JS_CallFunctionValue}', + 'js::jsapi::{JS_ComputeThis, JS_CopyPropertiesFrom, JS_ForwardGetPropertyTo}', + 'js::jsapi::{JS_GetClass, JS_GetGlobalForObject, JS_GetObjectPrototype}', + 'js::jsapi::{JS_GetProperty, JS_GetPropertyById, JS_GetPropertyDescriptorById}', + 'js::jsapi::{JS_GetReservedSlot, JS_HasProperty, JS_HasPropertyById}', + 'js::jsapi::{JS_InitializePropertiesFromCompatibleNativeObject, JS_InternString}', + 'js::jsapi::{JS_IsExceptionPending, JS_NewObject, JS_NewObjectWithGivenProto}', + 'js::jsapi::{JS_NewObjectWithoutMetadata, JS_SetProperty, JS_SetPrototype}', + 'js::jsapi::{JS_SetReservedSlot, JS_WrapValue, JSAutoCompartment, JSAutoRequest}', + 'js::jsapi::{JSContext, JSClass, JSFreeOp, JSFunctionSpec, JSJitGetterCallArgs}', + 'js::jsapi::{JSJitInfo, JSJitMethodCallArgs, JSJitSetterCallArgs, JSNative}', + 'js::jsapi::{JSObject, JSNativeWrapper, JSPropertyDescriptor, JSPropertySpec}', + 'js::jsapi::{JSString, JSTracer, JSType, JSTypedMethodJitInfo, JSValueType}', + 'js::jsapi::{ObjectOpResult, OpType, MutableHandle, MutableHandleObject}', + 'js::jsapi::{MutableHandleValue, RootedId, RootedObject, RootedString}', + 'js::jsapi::{RootedValue, SymbolCode, jsid}', 'js::jsval::JSVal', 'js::jsval::{ObjectValue, ObjectOrNullValue, PrivateValue}', 'js::jsval::{NullValue, UndefinedValue}', @@ -5209,30 +5362,24 @@ class CGBindingRoot(CGThing): 'js::glue::{RUST_FUNCTION_VALUE_TO_JITINFO}', 'js::glue::{RUST_JS_NumberValue, RUST_JSID_IS_STRING, int_to_jsid}', 'js::glue::AppendToAutoIdVector', - 'js::rust::GCMethods', + 'js::rust::{GCMethods, define_methods, define_properties}', 'dom::bindings', 'dom::bindings::global::{GlobalRef, global_root_from_object, global_root_from_reflector}', 'dom::bindings::js::{JS, Root, RootedReference}', 'dom::bindings::js::{OptionalRootedReference}', 'dom::bindings::reflector::{Reflectable}', - 'dom::bindings::utils::{create_dom_global, do_create_interface_objects}', - 'dom::bindings::utils::ConstantSpec', - 'dom::bindings::utils::{DOMClass}', - 'dom::bindings::utils::{DOMJSClass, JSCLASS_DOM_GLOBAL}', - 'dom::bindings::utils::{find_enum_string_index, get_array_index_from_id}', - 'dom::bindings::utils::{get_property_on_prototype, get_proto_or_iface_array}', - 'dom::bindings::utils::{finalize_global, trace_global}', - 'dom::bindings::utils::has_property_on_prototype', - 'dom::bindings::utils::is_platform_object', - 'dom::bindings::utils::throwing_constructor', - 'dom::bindings::utils::get_dictionary_property', - 'dom::bindings::utils::set_dictionary_property', - 'dom::bindings::utils::{NativeProperties, NativePropertyHooks}', + 'dom::bindings::utils::{ConstantSpec, DOMClass, DOMJSClass}', + 'dom::bindings::utils::{DOM_PROTO_UNFORGEABLE_HOLDER_SLOT, JSCLASS_DOM_GLOBAL}', + 'dom::bindings::utils::{NativeProperties, NativePropertyHooks, NonNullJSNative}', + 'dom::bindings::utils::{create_dom_global, do_create_interface_objects, finalize_global}', + 'dom::bindings::utils::{find_enum_string_index, generic_getter}', + 'dom::bindings::utils::{generic_lenient_getter, generic_lenient_setter}', + 'dom::bindings::utils::{generic_method, generic_setter, get_array_index_from_id}', + 'dom::bindings::utils::{get_dictionary_property, get_property_on_prototype}', + 'dom::bindings::utils::{get_proto_or_iface_array, has_property_on_prototype}', + 'dom::bindings::utils::{is_platform_object, set_dictionary_property}', + 'dom::bindings::utils::{throwing_constructor, trace_global}', 'dom::bindings::utils::ConstantVal::{IntVal, UintVal}', - 'dom::bindings::utils::NonNullJSNative', - 'dom::bindings::utils::{generic_getter, generic_lenient_getter}', - 'dom::bindings::utils::{generic_lenient_setter, generic_method}', - 'dom::bindings::utils::generic_setter', 'dom::bindings::trace::{JSTraceable, RootedTraceable}', 'dom::bindings::callback::{CallbackContainer,CallbackInterface,CallbackFunction}', 'dom::bindings::callback::{CallSetup,ExceptionHandling}', @@ -5248,8 +5395,8 @@ class CGBindingRoot(CGThing): 'dom::bindings::error::Error::JSFailed', 'dom::bindings::error::throw_dom_exception', 'dom::bindings::proxyhandler', - 'dom::bindings::proxyhandler::{fill_property_descriptor, get_expando_object}', - 'dom::bindings::proxyhandler::{get_property_descriptor}', + 'dom::bindings::proxyhandler::{ensure_expando_object, fill_property_descriptor}', + 'dom::bindings::proxyhandler::{get_expando_object, get_property_descriptor}', 'dom::bindings::num::Finite', 'dom::bindings::str::ByteString', 'dom::bindings::str::USVString', diff --git a/components/script/dom/bindings/codegen/Configuration.py b/components/script/dom/bindings/codegen/Configuration.py index 4f59ff09f5b..d0af7e37929 100644 --- a/components/script/dom/bindings/codegen/Configuration.py +++ b/components/script/dom/bindings/codegen/Configuration.py @@ -139,6 +139,13 @@ class DescriptorProvider: return self.config.getDescriptor(interfaceName) +def MemberIsUnforgeable(member, descriptor): + return ((member.isAttr() or member.isMethod()) and + not member.isStatic() and + (member.isUnforgeable() or + bool(descriptor.interface.getExtendedAttribute("Unforgeable")))) + + class Descriptor(DescriptorProvider): """ Represents a single descriptor for an interface. See Bindings.conf. @@ -174,6 +181,9 @@ class Descriptor(DescriptorProvider): # them as having a concrete descendant. self.concrete = (not self.interface.isCallback() and desc.get('concrete', True)) + self.hasUnforgeableMembers = (self.concrete and + any(MemberIsUnforgeable(m, self) for m in + self.interface.members)) self.operations = { 'IndexedGetter': None, diff --git a/components/script/dom/bindings/utils.rs b/components/script/dom/bindings/utils.rs index 97d5bb12eba..fe7c8030baa 100644 --- a/components/script/dom/bindings/utils.rs +++ b/components/script/dom/bindings/utils.rs @@ -78,6 +78,10 @@ impl GlobalStaticData { } } +/// The index of the slot where the object holder of that interface's +/// unforgeable members are defined. +pub const DOM_PROTO_UNFORGEABLE_HOLDER_SLOT: u32 = 0; + /// The index of the slot that contains a reference to the ProtoOrIfaceArray. // All DOM globals must have a slot at DOM_PROTOTYPE_SLOT. pub const DOM_PROTOTYPE_SLOT: u32 = js::JSCLASS_GLOBAL_SLOT_COUNT; @@ -181,8 +185,12 @@ pub fn get_proto_or_iface_array(global: *mut JSObject) -> *mut ProtoOrIfaceArray pub struct NativeProperties { /// Instance methods for the interface. pub methods: Option<&'static [JSFunctionSpec]>, + /// Unforgeable instance methods for the interface. + pub unforgeable_methods: Option<&'static [JSFunctionSpec]>, /// Instance attributes for the interface. pub attrs: Option<&'static [JSPropertySpec]>, + /// Unforgeable instance attributes for the interface. + pub unforgeable_attrs: Option<&'static [JSPropertySpec]>, /// Constants for the interface. pub consts: Option<&'static [ConstantSpec]>, /// Static methods for the interface. diff --git a/components/script/dom/create.rs b/components/script/dom/create.rs index 655c6a8d786..75a08464af7 100644 --- a/components/script/dom/create.rs +++ b/components/script/dom/create.rs @@ -87,16 +87,16 @@ pub fn create_element(name: QualName, let prefix = prefix.map(|p| DOMString::from(&*p)); if name.ns != ns!(html) { - return Element::new(DOMString::from(&*name.local), name.ns, prefix, document); + return Element::new(name.local, name.ns, prefix, document); } macro_rules! make( ($ctor:ident) => ({ - let obj = $ctor::new(DOMString::from(&*name.local), prefix, document); + let obj = $ctor::new(name.local, prefix, document); Root::upcast(obj) }); ($ctor:ident, $($arg:expr),+) => ({ - let obj = $ctor::new(DOMString::from(&*name.local), prefix, document, $($arg),+); + let obj = $ctor::new(name.local, prefix, document, $($arg),+); Root::upcast(obj) }) ); diff --git a/components/script/dom/domimplementation.rs b/components/script/dom/domimplementation.rs index 13cbeedd565..d994b111b69 100644 --- a/components/script/dom/domimplementation.rs +++ b/components/script/dom/domimplementation.rs @@ -132,14 +132,14 @@ impl DOMImplementationMethods for DOMImplementation { { // Step 4. let doc_node = doc.upcast::<Node>(); - let doc_html = Root::upcast::<Node>(HTMLHtmlElement::new(DOMString::from("html"), + let doc_html = Root::upcast::<Node>(HTMLHtmlElement::new(atom!("html"), None, doc.r())); doc_node.AppendChild(&doc_html).expect("Appending failed"); { // Step 5. - let doc_head = Root::upcast::<Node>(HTMLHeadElement::new(DOMString::from("head"), + let doc_head = Root::upcast::<Node>(HTMLHeadElement::new(atom!("head"), None, doc.r())); doc_html.AppendChild(&doc_head).unwrap(); @@ -150,7 +150,7 @@ impl DOMImplementationMethods for DOMImplementation { Some(title_str) => { // Step 6.1. let doc_title = - Root::upcast::<Node>(HTMLTitleElement::new(DOMString::from("title"), + Root::upcast::<Node>(HTMLTitleElement::new(atom!("title"), None, doc.r())); doc_head.AppendChild(&doc_title).unwrap(); @@ -163,7 +163,7 @@ impl DOMImplementationMethods for DOMImplementation { } // Step 7. - let doc_body = HTMLBodyElement::new(DOMString::from("body"), None, doc.r()); + let doc_body = HTMLBodyElement::new(atom!("body"), None, doc.r()); doc_html.AppendChild(doc_body.upcast()).unwrap(); } diff --git a/components/script/dom/element.rs b/components/script/dom/element.rs index e7d6a47076f..b343b1859a7 100644 --- a/components/script/dom/element.rs +++ b/components/script/dom/element.rs @@ -126,20 +126,20 @@ impl Element { } - pub fn new_inherited(local_name: DOMString, + pub fn new_inherited(local_name: Atom, namespace: Namespace, prefix: Option<DOMString>, document: &Document) -> Element { Element::new_inherited_with_state(ElementState::empty(), local_name, namespace, prefix, document) } - pub fn new_inherited_with_state(state: ElementState, local_name: DOMString, + pub fn new_inherited_with_state(state: ElementState, local_name: Atom, namespace: Namespace, prefix: Option<DOMString>, document: &Document) -> Element { Element { node: Node::new_inherited(document), - local_name: Atom::from(&*local_name), + local_name: local_name, namespace: namespace, prefix: prefix, attrs: DOMRefCell::new(vec![]), @@ -151,7 +151,7 @@ impl Element { } } - pub fn new(local_name: DOMString, + pub fn new(local_name: Atom, namespace: Namespace, prefix: Option<DOMString>, document: &Document) -> Root<Element> { @@ -1090,6 +1090,30 @@ impl Element { self.set_attribute(local_name, AttrValue::from_atomic_tokens(tokens)); } + pub fn get_int_attribute(&self, local_name: &Atom, default: i32) -> i32 { + // TODO: Is this assert necessary? + assert!(local_name.chars().all(|ch| { + !ch.is_ascii() || ch.to_ascii_lowercase() == ch + })); + let attribute = self.get_attribute(&ns!(), local_name); + + match attribute { + Some(ref attribute) => { + match *attribute.r().value() { + AttrValue::Int(_, value) => value, + _ => panic!("Expected an AttrValue::Int: \ + implement parse_plain_attribute"), + } + } + None => default, + } + } + + pub fn set_int_attribute(&self, local_name: &Atom, value: i32) { + assert!(&**local_name == local_name.to_ascii_lowercase()); + self.set_attribute(local_name, AttrValue::Int(DOMString::from(value.to_string()), value)); + } + pub fn get_uint_attribute(&self, local_name: &Atom, default: u32) -> u32 { assert!(local_name.chars().all(|ch| !ch.is_ascii() || ch.to_ascii_lowercase() == ch)); let attribute = self.get_attribute(&ns!(), local_name); diff --git a/components/script/dom/htmlanchorelement.rs b/components/script/dom/htmlanchorelement.rs index cd6aa841068..33fbdca845b 100644 --- a/components/script/dom/htmlanchorelement.rs +++ b/components/script/dom/htmlanchorelement.rs @@ -35,7 +35,7 @@ pub struct HTMLAnchorElement { } impl HTMLAnchorElement { - fn new_inherited(localName: DOMString, + fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLAnchorElement { HTMLAnchorElement { @@ -46,7 +46,7 @@ impl HTMLAnchorElement { } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, + pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLAnchorElement> { let element = HTMLAnchorElement::new_inherited(localName, prefix, document); diff --git a/components/script/dom/htmlappletelement.rs b/components/script/dom/htmlappletelement.rs index 5f435b3c6c8..1648e07dc11 100644 --- a/components/script/dom/htmlappletelement.rs +++ b/components/script/dom/htmlappletelement.rs @@ -20,7 +20,7 @@ pub struct HTMLAppletElement { } impl HTMLAppletElement { - fn new_inherited(localName: DOMString, + fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLAppletElement { HTMLAppletElement { @@ -30,7 +30,7 @@ impl HTMLAppletElement { } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, + pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLAppletElement> { let element = HTMLAppletElement::new_inherited(localName, prefix, document); diff --git a/components/script/dom/htmlareaelement.rs b/components/script/dom/htmlareaelement.rs index cd01baf4930..a19e0cc408e 100644 --- a/components/script/dom/htmlareaelement.rs +++ b/components/script/dom/htmlareaelement.rs @@ -24,7 +24,7 @@ pub struct HTMLAreaElement { } impl HTMLAreaElement { - fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: &Document) -> HTMLAreaElement { + fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLAreaElement { HTMLAreaElement { htmlelement: HTMLElement::new_inherited(localName, prefix, document), rel_list: Default::default(), @@ -32,7 +32,7 @@ impl HTMLAreaElement { } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, + pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLAreaElement> { let element = HTMLAreaElement::new_inherited(localName, prefix, document); diff --git a/components/script/dom/htmlaudioelement.rs b/components/script/dom/htmlaudioelement.rs index ed0b89cca27..98ee31fb299 100644 --- a/components/script/dom/htmlaudioelement.rs +++ b/components/script/dom/htmlaudioelement.rs @@ -7,6 +7,7 @@ use dom::bindings::js::Root; use dom::document::Document; use dom::htmlmediaelement::HTMLMediaElement; use dom::node::Node; +use string_cache::Atom; use util::str::DOMString; #[dom_struct] @@ -15,7 +16,7 @@ pub struct HTMLAudioElement { } impl HTMLAudioElement { - fn new_inherited(localName: DOMString, + fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLAudioElement { HTMLAudioElement { @@ -25,7 +26,7 @@ impl HTMLAudioElement { } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, + pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLAudioElement> { let element = HTMLAudioElement::new_inherited(localName, prefix, document); diff --git a/components/script/dom/htmlbaseelement.rs b/components/script/dom/htmlbaseelement.rs index a537b06b27a..e35469d5038 100644 --- a/components/script/dom/htmlbaseelement.rs +++ b/components/script/dom/htmlbaseelement.rs @@ -11,6 +11,7 @@ use dom::element::{AttributeMutation, Element}; use dom::htmlelement::HTMLElement; use dom::node::{Node, document_from_node}; use dom::virtualmethods::VirtualMethods; +use string_cache::Atom; use url::{Url, UrlParser}; use util::str::DOMString; @@ -20,14 +21,14 @@ pub struct HTMLBaseElement { } impl HTMLBaseElement { - fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: &Document) -> HTMLBaseElement { + fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLBaseElement { HTMLBaseElement { htmlelement: HTMLElement::new_inherited(localName, prefix, document) } } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, + pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLBaseElement> { let element = HTMLBaseElement::new_inherited(localName, prefix, document); diff --git a/components/script/dom/htmlbodyelement.rs b/components/script/dom/htmlbodyelement.rs index 6c9a9f3be5d..f7605ed5aa3 100644 --- a/components/script/dom/htmlbodyelement.rs +++ b/components/script/dom/htmlbodyelement.rs @@ -36,7 +36,7 @@ pub struct HTMLBodyElement { } impl HTMLBodyElement { - fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: &Document) + fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLBodyElement { HTMLBodyElement { htmlelement: HTMLElement::new_inherited(localName, prefix, document), @@ -45,7 +45,7 @@ impl HTMLBodyElement { } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, prefix: Option<DOMString>, document: &Document) + pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLBodyElement> { let element = HTMLBodyElement::new_inherited(localName, prefix, document); Node::reflect_node(box element, document, HTMLBodyElementBinding::Wrap) diff --git a/components/script/dom/htmlbrelement.rs b/components/script/dom/htmlbrelement.rs index 3007e772515..e9b31954f9f 100644 --- a/components/script/dom/htmlbrelement.rs +++ b/components/script/dom/htmlbrelement.rs @@ -7,6 +7,7 @@ use dom::bindings::js::Root; use dom::document::Document; use dom::htmlelement::HTMLElement; use dom::node::Node; +use string_cache::Atom; use util::str::DOMString; #[dom_struct] @@ -15,14 +16,14 @@ pub struct HTMLBRElement { } impl HTMLBRElement { - fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: &Document) -> HTMLBRElement { + fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLBRElement { HTMLBRElement { htmlelement: HTMLElement::new_inherited(localName, prefix, document) } } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, + pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLBRElement> { let element = HTMLBRElement::new_inherited(localName, prefix, document); diff --git a/components/script/dom/htmlbuttonelement.rs b/components/script/dom/htmlbuttonelement.rs index d2358ad0ee5..356f094f052 100644 --- a/components/script/dom/htmlbuttonelement.rs +++ b/components/script/dom/htmlbuttonelement.rs @@ -23,6 +23,7 @@ use dom::virtualmethods::VirtualMethods; use selectors::states::*; use std::ascii::AsciiExt; use std::cell::Cell; +use string_cache::Atom; use util::str::DOMString; #[derive(JSTraceable, PartialEq, Copy, Clone)] @@ -42,7 +43,7 @@ pub struct HTMLButtonElement { } impl HTMLButtonElement { - fn new_inherited(localName: DOMString, + fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLButtonElement { HTMLButtonElement { @@ -55,7 +56,7 @@ impl HTMLButtonElement { } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, + pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLButtonElement> { let element = HTMLButtonElement::new_inherited(localName, prefix, document); diff --git a/components/script/dom/htmlcanvaselement.rs b/components/script/dom/htmlcanvaselement.rs index 325a324b3c7..472f7beee28 100644 --- a/components/script/dom/htmlcanvaselement.rs +++ b/components/script/dom/htmlcanvaselement.rs @@ -60,7 +60,7 @@ impl PartialEq for HTMLCanvasElement { } impl HTMLCanvasElement { - fn new_inherited(localName: DOMString, + fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLCanvasElement { HTMLCanvasElement { @@ -70,7 +70,7 @@ impl HTMLCanvasElement { } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, + pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLCanvasElement> { let element = HTMLCanvasElement::new_inherited(localName, prefix, document); diff --git a/components/script/dom/htmldataelement.rs b/components/script/dom/htmldataelement.rs index dbbd1c5cdcf..9f949afb1fb 100644 --- a/components/script/dom/htmldataelement.rs +++ b/components/script/dom/htmldataelement.rs @@ -7,6 +7,7 @@ use dom::bindings::js::Root; use dom::document::Document; use dom::htmlelement::HTMLElement; use dom::node::Node; +use string_cache::Atom; use util::str::DOMString; #[dom_struct] @@ -15,7 +16,7 @@ pub struct HTMLDataElement { } impl HTMLDataElement { - fn new_inherited(localName: DOMString, + fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLDataElement { HTMLDataElement { @@ -24,7 +25,7 @@ impl HTMLDataElement { } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, + pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLDataElement> { let element = HTMLDataElement::new_inherited(localName, prefix, document); diff --git a/components/script/dom/htmldatalistelement.rs b/components/script/dom/htmldatalistelement.rs index d0a9a51dce1..064b3d50b56 100644 --- a/components/script/dom/htmldatalistelement.rs +++ b/components/script/dom/htmldatalistelement.rs @@ -12,6 +12,7 @@ use dom::htmlcollection::{CollectionFilter, HTMLCollection}; use dom::htmlelement::HTMLElement; use dom::htmloptionelement::HTMLOptionElement; use dom::node::{Node, window_from_node}; +use string_cache::Atom; use util::str::DOMString; #[dom_struct] @@ -20,7 +21,7 @@ pub struct HTMLDataListElement { } impl HTMLDataListElement { - fn new_inherited(localName: DOMString, + fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLDataListElement { HTMLDataListElement { @@ -30,7 +31,7 @@ impl HTMLDataListElement { } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, + pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLDataListElement> { let element = HTMLDataListElement::new_inherited(localName, prefix, document); diff --git a/components/script/dom/htmldialogelement.rs b/components/script/dom/htmldialogelement.rs index 108e9cbc4ea..f6d10f33a9f 100644 --- a/components/script/dom/htmldialogelement.rs +++ b/components/script/dom/htmldialogelement.rs @@ -9,6 +9,7 @@ use dom::bindings::js::Root; use dom::document::Document; use dom::htmlelement::HTMLElement; use dom::node::Node; +use string_cache::Atom; use util::str::DOMString; #[dom_struct] @@ -18,7 +19,7 @@ pub struct HTMLDialogElement { } impl HTMLDialogElement { - fn new_inherited(localName: DOMString, + fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLDialogElement { HTMLDialogElement { @@ -29,7 +30,7 @@ impl HTMLDialogElement { } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, + pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLDialogElement> { let element = HTMLDialogElement::new_inherited(localName, prefix, document); diff --git a/components/script/dom/htmldirectoryelement.rs b/components/script/dom/htmldirectoryelement.rs index 231fb3a711d..2c48231beff 100644 --- a/components/script/dom/htmldirectoryelement.rs +++ b/components/script/dom/htmldirectoryelement.rs @@ -7,6 +7,7 @@ use dom::bindings::js::Root; use dom::document::Document; use dom::htmlelement::HTMLElement; use dom::node::Node; +use string_cache::Atom; use util::str::DOMString; #[dom_struct] @@ -15,7 +16,7 @@ pub struct HTMLDirectoryElement { } impl HTMLDirectoryElement { - fn new_inherited(localName: DOMString, + fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLDirectoryElement { HTMLDirectoryElement { @@ -25,7 +26,7 @@ impl HTMLDirectoryElement { } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, + pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLDirectoryElement> { let element = HTMLDirectoryElement::new_inherited(localName, prefix, document); diff --git a/components/script/dom/htmldivelement.rs b/components/script/dom/htmldivelement.rs index 6d682317e65..eaa99f3e100 100644 --- a/components/script/dom/htmldivelement.rs +++ b/components/script/dom/htmldivelement.rs @@ -7,6 +7,7 @@ use dom::bindings::js::Root; use dom::document::Document; use dom::htmlelement::HTMLElement; use dom::node::Node; +use string_cache::Atom; use util::str::DOMString; #[dom_struct] @@ -15,7 +16,7 @@ pub struct HTMLDivElement { } impl HTMLDivElement { - fn new_inherited(localName: DOMString, + fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLDivElement { HTMLDivElement { @@ -24,7 +25,7 @@ impl HTMLDivElement { } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, + pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLDivElement> { let element = HTMLDivElement::new_inherited(localName, prefix, document); diff --git a/components/script/dom/htmldlistelement.rs b/components/script/dom/htmldlistelement.rs index 5c42844a717..bfc36d67d38 100644 --- a/components/script/dom/htmldlistelement.rs +++ b/components/script/dom/htmldlistelement.rs @@ -7,6 +7,7 @@ use dom::bindings::js::Root; use dom::document::Document; use dom::htmlelement::HTMLElement; use dom::node::Node; +use string_cache::Atom; use util::str::DOMString; #[dom_struct] @@ -15,7 +16,7 @@ pub struct HTMLDListElement { } impl HTMLDListElement { - fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: &Document) -> HTMLDListElement { + fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLDListElement { HTMLDListElement { htmlelement: HTMLElement::new_inherited(localName, prefix, document) @@ -23,7 +24,7 @@ impl HTMLDListElement { } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, + pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLDListElement> { let element = HTMLDListElement::new_inherited(localName, prefix, document); diff --git a/components/script/dom/htmlelement.rs b/components/script/dom/htmlelement.rs index c40b4477e5a..4b5fb69cf88 100644 --- a/components/script/dom/htmlelement.rs +++ b/components/script/dom/htmlelement.rs @@ -54,12 +54,12 @@ impl PartialEq for HTMLElement { } impl HTMLElement { - pub fn new_inherited(tag_name: DOMString, prefix: Option<DOMString>, + pub fn new_inherited(tag_name: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLElement { HTMLElement::new_inherited_with_state(ElementState::empty(), tag_name, prefix, document) } - pub fn new_inherited_with_state(state: ElementState, tag_name: DOMString, + pub fn new_inherited_with_state(state: ElementState, tag_name: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLElement { HTMLElement { @@ -71,7 +71,7 @@ impl HTMLElement { } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, prefix: Option<DOMString>, document: &Document) -> Root<HTMLElement> { + pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLElement> { let element = HTMLElement::new_inherited(localName, prefix, document); Node::reflect_node(box element, document, HTMLElementBinding::Wrap) } diff --git a/components/script/dom/htmlembedelement.rs b/components/script/dom/htmlembedelement.rs index 7af4dac4da7..f5c96bfc583 100644 --- a/components/script/dom/htmlembedelement.rs +++ b/components/script/dom/htmlembedelement.rs @@ -7,6 +7,7 @@ use dom::bindings::js::Root; use dom::document::Document; use dom::htmlelement::HTMLElement; use dom::node::Node; +use string_cache::Atom; use util::str::DOMString; #[dom_struct] @@ -15,14 +16,14 @@ pub struct HTMLEmbedElement { } impl HTMLEmbedElement { - fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: &Document) -> HTMLEmbedElement { + fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLEmbedElement { HTMLEmbedElement { htmlelement: HTMLElement::new_inherited(localName, prefix, document) } } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, + pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLEmbedElement> { let element = HTMLEmbedElement::new_inherited(localName, prefix, document); diff --git a/components/script/dom/htmlfieldsetelement.rs b/components/script/dom/htmlfieldsetelement.rs index a2c45a1b46c..8dc1cc043ee 100644 --- a/components/script/dom/htmlfieldsetelement.rs +++ b/components/script/dom/htmlfieldsetelement.rs @@ -17,6 +17,7 @@ use dom::node::{Node, window_from_node}; use dom::validitystate::ValidityState; use dom::virtualmethods::VirtualMethods; use selectors::states::*; +use string_cache::Atom; use util::str::{DOMString, StaticStringVec}; #[dom_struct] @@ -25,7 +26,7 @@ pub struct HTMLFieldSetElement { } impl HTMLFieldSetElement { - fn new_inherited(localName: DOMString, + fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLFieldSetElement { HTMLFieldSetElement { @@ -36,7 +37,7 @@ impl HTMLFieldSetElement { } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, + pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLFieldSetElement> { let element = HTMLFieldSetElement::new_inherited(localName, prefix, document); diff --git a/components/script/dom/htmlfontelement.rs b/components/script/dom/htmlfontelement.rs index c8faf248f41..5d7dbe7ed34 100644 --- a/components/script/dom/htmlfontelement.rs +++ b/components/script/dom/htmlfontelement.rs @@ -24,14 +24,14 @@ pub struct HTMLFontElement { impl HTMLFontElement { - fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: &Document) -> HTMLFontElement { + fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLFontElement { HTMLFontElement { htmlelement: HTMLElement::new_inherited(localName, prefix, document), } } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, + pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLFontElement> { let element = HTMLFontElement::new_inherited(localName, prefix, document); diff --git a/components/script/dom/htmlformelement.rs b/components/script/dom/htmlformelement.rs index 6d37719a862..dda93487caf 100644 --- a/components/script/dom/htmlformelement.rs +++ b/components/script/dom/htmlformelement.rs @@ -49,7 +49,7 @@ impl PartialEq for HTMLFormElement { } impl HTMLFormElement { - fn new_inherited(localName: DOMString, + fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLFormElement { HTMLFormElement { @@ -59,7 +59,7 @@ impl HTMLFormElement { } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, + pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLFormElement> { let element = HTMLFormElement::new_inherited(localName, prefix, document); @@ -209,7 +209,8 @@ impl HTMLFormElement { load_data.data = Some(parsed_data.into_bytes()); }, // https://html.spec.whatwg.org/multipage/#submit-get-action - ("ftp", _) | ("javascript", _) | ("data", FormMethod::FormGet) => (), + ("file", _) | ("about", _) | ("data", FormMethod::FormGet) | + ("ftp", _) | ("javascript", _) => (), _ => return // Unimplemented (data and mailto) } diff --git a/components/script/dom/htmlframeelement.rs b/components/script/dom/htmlframeelement.rs index 72b6307096a..2907fea4168 100644 --- a/components/script/dom/htmlframeelement.rs +++ b/components/script/dom/htmlframeelement.rs @@ -7,6 +7,7 @@ use dom::bindings::js::Root; use dom::document::Document; use dom::htmlelement::HTMLElement; use dom::node::Node; +use string_cache::Atom; use util::str::DOMString; #[dom_struct] @@ -15,14 +16,14 @@ pub struct HTMLFrameElement { } impl HTMLFrameElement { - fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: &Document) -> HTMLFrameElement { + fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLFrameElement { HTMLFrameElement { htmlelement: HTMLElement::new_inherited(localName, prefix, document) } } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, + pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLFrameElement> { let element = HTMLFrameElement::new_inherited(localName, prefix, document); diff --git a/components/script/dom/htmlframesetelement.rs b/components/script/dom/htmlframesetelement.rs index 9db91262264..92170a0baf4 100644 --- a/components/script/dom/htmlframesetelement.rs +++ b/components/script/dom/htmlframesetelement.rs @@ -7,6 +7,7 @@ use dom::bindings::js::Root; use dom::document::Document; use dom::htmlelement::HTMLElement; use dom::node::Node; +use string_cache::Atom; use util::str::DOMString; #[dom_struct] @@ -15,7 +16,7 @@ pub struct HTMLFrameSetElement { } impl HTMLFrameSetElement { - fn new_inherited(localName: DOMString, + fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLFrameSetElement { HTMLFrameSetElement { @@ -25,7 +26,7 @@ impl HTMLFrameSetElement { } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, + pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLFrameSetElement> { let element = HTMLFrameSetElement::new_inherited(localName, prefix, document); diff --git a/components/script/dom/htmlheadelement.rs b/components/script/dom/htmlheadelement.rs index 7bb42b0cfea..4f87db1d824 100644 --- a/components/script/dom/htmlheadelement.rs +++ b/components/script/dom/htmlheadelement.rs @@ -10,6 +10,7 @@ use dom::htmlelement::HTMLElement; use dom::node::Node; use dom::userscripts::load_script; use dom::virtualmethods::VirtualMethods; +use string_cache::Atom; use util::str::DOMString; #[dom_struct] @@ -18,7 +19,7 @@ pub struct HTMLHeadElement { } impl HTMLHeadElement { - fn new_inherited(localName: DOMString, + fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLHeadElement { HTMLHeadElement { @@ -27,7 +28,7 @@ impl HTMLHeadElement { } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, + pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLHeadElement> { let element = HTMLHeadElement::new_inherited(localName, prefix, document); diff --git a/components/script/dom/htmlheadingelement.rs b/components/script/dom/htmlheadingelement.rs index f0aa4c046c7..5f219b54f34 100644 --- a/components/script/dom/htmlheadingelement.rs +++ b/components/script/dom/htmlheadingelement.rs @@ -7,6 +7,7 @@ use dom::bindings::js::Root; use dom::document::Document; use dom::htmlelement::HTMLElement; use dom::node::Node; +use string_cache::Atom; use util::str::DOMString; #[derive(JSTraceable, HeapSizeOf)] @@ -26,7 +27,7 @@ pub struct HTMLHeadingElement { } impl HTMLHeadingElement { - fn new_inherited(localName: DOMString, + fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document, level: HeadingLevel) -> HTMLHeadingElement { @@ -38,7 +39,7 @@ impl HTMLHeadingElement { } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, + pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document, level: HeadingLevel) -> Root<HTMLHeadingElement> { diff --git a/components/script/dom/htmlhrelement.rs b/components/script/dom/htmlhrelement.rs index 84c409506e8..93fdebbc954 100644 --- a/components/script/dom/htmlhrelement.rs +++ b/components/script/dom/htmlhrelement.rs @@ -21,14 +21,14 @@ pub struct HTMLHRElement { } impl HTMLHRElement { - fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: &Document) -> HTMLHRElement { + fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLHRElement { HTMLHRElement { htmlelement: HTMLElement::new_inherited(localName, prefix, document) } } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, + pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLHRElement> { let element = HTMLHRElement::new_inherited(localName, prefix, document); diff --git a/components/script/dom/htmlhtmlelement.rs b/components/script/dom/htmlhtmlelement.rs index 85f94051547..2ae0e3d5fb3 100644 --- a/components/script/dom/htmlhtmlelement.rs +++ b/components/script/dom/htmlhtmlelement.rs @@ -7,6 +7,7 @@ use dom::bindings::js::Root; use dom::document::Document; use dom::htmlelement::HTMLElement; use dom::node::Node; +use string_cache::Atom; use util::str::DOMString; #[dom_struct] @@ -15,14 +16,14 @@ pub struct HTMLHtmlElement { } impl HTMLHtmlElement { - fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: &Document) -> HTMLHtmlElement { + fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLHtmlElement { HTMLHtmlElement { htmlelement: HTMLElement::new_inherited(localName, prefix, document) } } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, + pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLHtmlElement> { let element = HTMLHtmlElement::new_inherited(localName, prefix, document); diff --git a/components/script/dom/htmliframeelement.rs b/components/script/dom/htmliframeelement.rs index fe07d28a198..3798ab4f539 100644 --- a/components/script/dom/htmliframeelement.rs +++ b/components/script/dom/htmliframeelement.rs @@ -160,7 +160,7 @@ impl HTMLIFrameElement { self.subpage_id.set(Some(new_subpage_id)); } - fn new_inherited(localName: DOMString, + fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLIFrameElement { HTMLIFrameElement { @@ -173,7 +173,7 @@ impl HTMLIFrameElement { } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, + pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLIFrameElement> { let element = HTMLIFrameElement::new_inherited(localName, prefix, document); diff --git a/components/script/dom/htmlimageelement.rs b/components/script/dom/htmlimageelement.rs index 06603de0e00..fa9a7e5d69b 100644 --- a/components/script/dom/htmlimageelement.rs +++ b/components/script/dom/htmlimageelement.rs @@ -128,7 +128,7 @@ impl HTMLImageElement { } } - fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: &Document) -> HTMLImageElement { + fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLImageElement { HTMLImageElement { htmlelement: HTMLElement::new_inherited(localName, prefix, document), url: DOMRefCell::new(None), @@ -137,7 +137,7 @@ impl HTMLImageElement { } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, + pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLImageElement> { let element = HTMLImageElement::new_inherited(localName, prefix, document); @@ -148,7 +148,7 @@ impl HTMLImageElement { width: Option<u32>, height: Option<u32>) -> Fallible<Root<HTMLImageElement>> { let document = global.as_window().Document(); - let image = HTMLImageElement::new(DOMString::from("img"), None, document.r()); + let image = HTMLImageElement::new(atom!("img"), None, document.r()); if let Some(w) = width { image.SetWidth(w); } diff --git a/components/script/dom/htmlinputelement.rs b/components/script/dom/htmlinputelement.rs index 524f70e1288..cd640b83287 100644 --- a/components/script/dom/htmlinputelement.rs +++ b/components/script/dom/htmlinputelement.rs @@ -64,6 +64,7 @@ pub struct HTMLInputElement { placeholder: DOMRefCell<DOMString>, value_changed: Cell<bool>, size: Cell<u32>, + maxlength: Cell<i32>, #[ignore_heap_size_of = "#7193"] textinput: DOMRefCell<TextInput<ConstellationChan<ConstellationMsg>>>, activation_state: DOMRefCell<InputActivationState>, @@ -103,9 +104,10 @@ impl InputActivationState { } static DEFAULT_INPUT_SIZE: u32 = 20; +static DEFAULT_MAX_LENGTH: i32 = -1; impl HTMLInputElement { - fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: &Document) -> HTMLInputElement { + fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLInputElement { let chan = document.window().constellation_chan(); HTMLInputElement { htmlelement: @@ -115,14 +117,15 @@ impl HTMLInputElement { placeholder: DOMRefCell::new(DOMString::new()), checked_changed: Cell::new(false), value_changed: Cell::new(false), + maxlength: Cell::new(DEFAULT_MAX_LENGTH), size: Cell::new(DEFAULT_INPUT_SIZE), - textinput: DOMRefCell::new(TextInput::new(Single, DOMString::new(), chan)), + textinput: DOMRefCell::new(TextInput::new(Single, DOMString::new(), chan, None)), activation_state: DOMRefCell::new(InputActivationState::new()) } } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, + pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLInputElement> { let element = HTMLInputElement::new_inherited(localName, prefix, document); @@ -337,6 +340,12 @@ impl HTMLInputElementMethods for HTMLInputElement { // https://html.spec.whatwg.org/multipage/#dom-input-formtarget make_setter!(SetFormTarget, "formtarget"); + // https://html.spec.whatwg.org/multipage/#dom-input-maxlength + make_int_getter!(MaxLength, "maxlength", DEFAULT_MAX_LENGTH); + + // https://html.spec.whatwg.org/multipage/#dom-input-maxlength + make_limited_int_setter!(SetMaxLength, "maxlength", DEFAULT_MAX_LENGTH); + // https://html.spec.whatwg.org/multipage/#dom-input-indeterminate fn Indeterminate(&self) -> bool { self.upcast::<Element>().get_state().contains(IN_INDETERMINATE_STATE) @@ -511,6 +520,7 @@ impl VirtualMethods for HTMLInputElement { fn attribute_mutated(&self, attr: &Attr, mutation: AttributeMutation) { self.super_type().unwrap().attribute_mutated(attr, mutation); + match attr.local_name() { &atom!("disabled") => { let disabled_state = match mutation { @@ -581,6 +591,18 @@ impl VirtualMethods for HTMLInputElement { self.radio_group_updated( mutation.new_value(attr).as_ref().map(|name| name.as_atom())); }, + &atom!("maxlength") => { + match *attr.value() { + AttrValue::Int(_, value) => { + if value < 0 { + self.textinput.borrow_mut().max_length = None + } else { + self.textinput.borrow_mut().max_length = Some(value as usize) + } + }, + _ => panic!("Expected an AttrValue::Int"), + } + } &atom!("placeholder") => { // FIXME(ajeffrey): Should we do in-place mutation of the placeholder? let mut placeholder = self.placeholder.borrow_mut(); @@ -599,6 +621,7 @@ impl VirtualMethods for HTMLInputElement { &atom!("name") => AttrValue::from_atomic(value), &atom!("size") => AttrValue::from_limited_u32(value, DEFAULT_INPUT_SIZE), &atom!("type") => AttrValue::from_atomic(value), + &atom!("maxlength") => AttrValue::from_limited_i32(value, DEFAULT_MAX_LENGTH), _ => self.super_type().unwrap().parse_plain_attribute(name, value), } } diff --git a/components/script/dom/htmllabelelement.rs b/components/script/dom/htmllabelelement.rs index 69fac1871b1..fb32405084d 100644 --- a/components/script/dom/htmllabelelement.rs +++ b/components/script/dom/htmllabelelement.rs @@ -25,7 +25,7 @@ pub struct HTMLLabelElement { } impl HTMLLabelElement { - fn new_inherited(localName: DOMString, + fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLLabelElement { HTMLLabelElement { @@ -35,7 +35,7 @@ impl HTMLLabelElement { } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, + pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLLabelElement> { let element = HTMLLabelElement::new_inherited(localName, prefix, document); diff --git a/components/script/dom/htmllegendelement.rs b/components/script/dom/htmllegendelement.rs index bc99bcec2b1..8686c5a4c10 100644 --- a/components/script/dom/htmllegendelement.rs +++ b/components/script/dom/htmllegendelement.rs @@ -7,6 +7,7 @@ use dom::bindings::js::Root; use dom::document::Document; use dom::htmlelement::HTMLElement; use dom::node::Node; +use string_cache::Atom; use util::str::DOMString; #[dom_struct] @@ -15,7 +16,7 @@ pub struct HTMLLegendElement { } impl HTMLLegendElement { - fn new_inherited(localName: DOMString, + fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLLegendElement { HTMLLegendElement { @@ -25,7 +26,7 @@ impl HTMLLegendElement { } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, + pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLLegendElement> { let element = HTMLLegendElement::new_inherited(localName, prefix, document); diff --git a/components/script/dom/htmllielement.rs b/components/script/dom/htmllielement.rs index 00a99791b8f..e0deac587fc 100644 --- a/components/script/dom/htmllielement.rs +++ b/components/script/dom/htmllielement.rs @@ -7,6 +7,7 @@ use dom::bindings::js::Root; use dom::document::Document; use dom::htmlelement::HTMLElement; use dom::node::Node; +use string_cache::Atom; use util::str::DOMString; #[dom_struct] @@ -15,14 +16,14 @@ pub struct HTMLLIElement { } impl HTMLLIElement { - fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: &Document) -> HTMLLIElement { + fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLLIElement { HTMLLIElement { htmlelement: HTMLElement::new_inherited(localName, prefix, document) } } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, + pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLLIElement> { let element = HTMLLIElement::new_inherited(localName, prefix, document); diff --git a/components/script/dom/htmllinkelement.rs b/components/script/dom/htmllinkelement.rs index b368bff3f26..b8d757920a8 100644 --- a/components/script/dom/htmllinkelement.rs +++ b/components/script/dom/htmllinkelement.rs @@ -53,7 +53,7 @@ pub struct HTMLLinkElement { } impl HTMLLinkElement { - fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: &Document, + fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document, creator: ElementCreator) -> HTMLLinkElement { HTMLLinkElement { htmlelement: HTMLElement::new_inherited(localName, prefix, document), @@ -64,7 +64,7 @@ impl HTMLLinkElement { } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, + pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document, creator: ElementCreator) -> Root<HTMLLinkElement> { diff --git a/components/script/dom/htmlmapelement.rs b/components/script/dom/htmlmapelement.rs index 30816c51409..278b0eb66ab 100644 --- a/components/script/dom/htmlmapelement.rs +++ b/components/script/dom/htmlmapelement.rs @@ -7,6 +7,7 @@ use dom::bindings::js::Root; use dom::document::Document; use dom::htmlelement::HTMLElement; use dom::node::Node; +use string_cache::Atom; use util::str::DOMString; #[dom_struct] @@ -15,7 +16,7 @@ pub struct HTMLMapElement { } impl HTMLMapElement { - fn new_inherited(localName: DOMString, + fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLMapElement { HTMLMapElement { @@ -24,7 +25,7 @@ impl HTMLMapElement { } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, + pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLMapElement> { let element = HTMLMapElement::new_inherited(localName, prefix, document); diff --git a/components/script/dom/htmlmediaelement.rs b/components/script/dom/htmlmediaelement.rs index 06c2f32a7a4..7b21703341d 100644 --- a/components/script/dom/htmlmediaelement.rs +++ b/components/script/dom/htmlmediaelement.rs @@ -4,6 +4,7 @@ use dom::document::Document; use dom::htmlelement::HTMLElement; +use string_cache::Atom; use util::str::DOMString; #[dom_struct] @@ -12,7 +13,7 @@ pub struct HTMLMediaElement { } impl HTMLMediaElement { - pub fn new_inherited(tag_name: DOMString, + pub fn new_inherited(tag_name: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLMediaElement { HTMLMediaElement { diff --git a/components/script/dom/htmlmetaelement.rs b/components/script/dom/htmlmetaelement.rs index 0d2730c5f42..d39f37abd7a 100644 --- a/components/script/dom/htmlmetaelement.rs +++ b/components/script/dom/htmlmetaelement.rs @@ -14,6 +14,7 @@ use dom::node::{Node, document_from_node}; use dom::virtualmethods::VirtualMethods; use std::ascii::AsciiExt; use std::sync::Arc; +use string_cache::Atom; use style::stylesheets::{CSSRule, Origin, Stylesheet}; use style::viewport::ViewportRule; use util::str::{DOMString, HTML_SPACE_CHARACTERS}; @@ -25,7 +26,7 @@ pub struct HTMLMetaElement { } impl HTMLMetaElement { - fn new_inherited(localName: DOMString, + fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLMetaElement { HTMLMetaElement { @@ -35,7 +36,7 @@ impl HTMLMetaElement { } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, + pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLMetaElement> { let element = HTMLMetaElement::new_inherited(localName, prefix, document); diff --git a/components/script/dom/htmlmeterelement.rs b/components/script/dom/htmlmeterelement.rs index 91006fb486b..e41af546790 100644 --- a/components/script/dom/htmlmeterelement.rs +++ b/components/script/dom/htmlmeterelement.rs @@ -9,6 +9,7 @@ use dom::document::Document; use dom::htmlelement::HTMLElement; use dom::node::Node; use dom::nodelist::NodeList; +use string_cache::Atom; use util::str::DOMString; #[dom_struct] @@ -17,7 +18,7 @@ pub struct HTMLMeterElement { } impl HTMLMeterElement { - fn new_inherited(localName: DOMString, + fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLMeterElement { HTMLMeterElement { @@ -26,7 +27,7 @@ impl HTMLMeterElement { } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, + pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLMeterElement> { let element = HTMLMeterElement::new_inherited(localName, prefix, document); diff --git a/components/script/dom/htmlmodelement.rs b/components/script/dom/htmlmodelement.rs index d05971998bb..3961f3ae35c 100644 --- a/components/script/dom/htmlmodelement.rs +++ b/components/script/dom/htmlmodelement.rs @@ -7,6 +7,7 @@ use dom::bindings::js::Root; use dom::document::Document; use dom::htmlelement::HTMLElement; use dom::node::Node; +use string_cache::Atom; use util::str::DOMString; #[dom_struct] @@ -15,7 +16,7 @@ pub struct HTMLModElement { } impl HTMLModElement { - fn new_inherited(localName: DOMString, + fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLModElement { HTMLModElement { @@ -25,7 +26,7 @@ impl HTMLModElement { } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, + pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLModElement> { let element = HTMLModElement::new_inherited(localName, prefix, document); diff --git a/components/script/dom/htmlobjectelement.rs b/components/script/dom/htmlobjectelement.rs index 0bbb86b5ffc..c60c4dd1d13 100644 --- a/components/script/dom/htmlobjectelement.rs +++ b/components/script/dom/htmlobjectelement.rs @@ -17,6 +17,7 @@ use dom::validitystate::ValidityState; use dom::virtualmethods::VirtualMethods; use net_traits::image::base::Image; use std::sync::Arc; +use string_cache::Atom; use util::str::DOMString; #[dom_struct] @@ -26,7 +27,7 @@ pub struct HTMLObjectElement { } impl HTMLObjectElement { - fn new_inherited(localName: DOMString, + fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLObjectElement { HTMLObjectElement { @@ -37,7 +38,7 @@ impl HTMLObjectElement { } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, + pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLObjectElement> { let element = HTMLObjectElement::new_inherited(localName, prefix, document); diff --git a/components/script/dom/htmlolistelement.rs b/components/script/dom/htmlolistelement.rs index 4ac17a95d14..d8aa78e3bc6 100644 --- a/components/script/dom/htmlolistelement.rs +++ b/components/script/dom/htmlolistelement.rs @@ -7,6 +7,7 @@ use dom::bindings::js::Root; use dom::document::Document; use dom::htmlelement::HTMLElement; use dom::node::Node; +use string_cache::Atom; use util::str::DOMString; #[dom_struct] @@ -15,7 +16,7 @@ pub struct HTMLOListElement { } impl HTMLOListElement { - fn new_inherited(localName: DOMString, + fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLOListElement { HTMLOListElement { @@ -24,7 +25,7 @@ impl HTMLOListElement { } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, + pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLOListElement> { let element = HTMLOListElement::new_inherited(localName, prefix, document); diff --git a/components/script/dom/htmloptgroupelement.rs b/components/script/dom/htmloptgroupelement.rs index 3b146e62091..b0624d426f9 100644 --- a/components/script/dom/htmloptgroupelement.rs +++ b/components/script/dom/htmloptgroupelement.rs @@ -14,6 +14,7 @@ use dom::htmloptionelement::HTMLOptionElement; use dom::node::Node; use dom::virtualmethods::VirtualMethods; use selectors::states::*; +use string_cache::Atom; use util::str::DOMString; #[dom_struct] @@ -22,7 +23,7 @@ pub struct HTMLOptGroupElement { } impl HTMLOptGroupElement { - fn new_inherited(localName: DOMString, + fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLOptGroupElement { HTMLOptGroupElement { @@ -33,7 +34,7 @@ impl HTMLOptGroupElement { } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, + pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLOptGroupElement> { let element = HTMLOptGroupElement::new_inherited(localName, prefix, document); diff --git a/components/script/dom/htmloptionelement.rs b/components/script/dom/htmloptionelement.rs index c73138be9c0..67e58b3d46e 100644 --- a/components/script/dom/htmloptionelement.rs +++ b/components/script/dom/htmloptionelement.rs @@ -20,6 +20,7 @@ use dom::text::Text; use dom::virtualmethods::VirtualMethods; use selectors::states::*; use std::cell::Cell; +use string_cache::Atom; use util::str::{DOMString, split_html_space_chars, str_join}; #[dom_struct] @@ -34,7 +35,7 @@ pub struct HTMLOptionElement { } impl HTMLOptionElement { - fn new_inherited(localName: DOMString, + fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLOptionElement { HTMLOptionElement { @@ -47,7 +48,7 @@ impl HTMLOptionElement { } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, + pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLOptionElement> { let element = HTMLOptionElement::new_inherited(localName, prefix, document); diff --git a/components/script/dom/htmloutputelement.rs b/components/script/dom/htmloutputelement.rs index 9049262aa8c..0a018f4217d 100644 --- a/components/script/dom/htmloutputelement.rs +++ b/components/script/dom/htmloutputelement.rs @@ -12,6 +12,7 @@ use dom::htmlformelement::{FormControl, HTMLFormElement}; use dom::node::{Node, window_from_node}; use dom::nodelist::NodeList; use dom::validitystate::ValidityState; +use string_cache::Atom; use util::str::DOMString; #[dom_struct] @@ -20,7 +21,7 @@ pub struct HTMLOutputElement { } impl HTMLOutputElement { - fn new_inherited(localName: DOMString, + fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLOutputElement { HTMLOutputElement { @@ -30,7 +31,7 @@ impl HTMLOutputElement { } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, + pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLOutputElement> { let element = HTMLOutputElement::new_inherited(localName, prefix, document); diff --git a/components/script/dom/htmlparagraphelement.rs b/components/script/dom/htmlparagraphelement.rs index c6f867d9cfb..828e2f37742 100644 --- a/components/script/dom/htmlparagraphelement.rs +++ b/components/script/dom/htmlparagraphelement.rs @@ -7,6 +7,7 @@ use dom::bindings::js::Root; use dom::document::Document; use dom::htmlelement::HTMLElement; use dom::node::Node; +use string_cache::Atom; use util::str::DOMString; #[dom_struct] @@ -15,7 +16,7 @@ pub struct HTMLParagraphElement { } impl HTMLParagraphElement { - fn new_inherited(localName: DOMString, + fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLParagraphElement { HTMLParagraphElement { @@ -25,7 +26,7 @@ impl HTMLParagraphElement { } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, + pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLParagraphElement> { let element = HTMLParagraphElement::new_inherited(localName, prefix, document); diff --git a/components/script/dom/htmlparamelement.rs b/components/script/dom/htmlparamelement.rs index 4cf7f1b2672..6e9da2e787b 100644 --- a/components/script/dom/htmlparamelement.rs +++ b/components/script/dom/htmlparamelement.rs @@ -7,6 +7,7 @@ use dom::bindings::js::Root; use dom::document::Document; use dom::htmlelement::HTMLElement; use dom::node::Node; +use string_cache::Atom; use util::str::DOMString; #[dom_struct] @@ -15,7 +16,7 @@ pub struct HTMLParamElement { } impl HTMLParamElement { - fn new_inherited(localName: DOMString, + fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLParamElement { HTMLParamElement { @@ -25,7 +26,7 @@ impl HTMLParamElement { } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, + pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLParamElement> { let element = HTMLParamElement::new_inherited(localName, prefix, document); diff --git a/components/script/dom/htmlpreelement.rs b/components/script/dom/htmlpreelement.rs index 71ba4d8d8a1..d227c70cb83 100644 --- a/components/script/dom/htmlpreelement.rs +++ b/components/script/dom/htmlpreelement.rs @@ -7,6 +7,7 @@ use dom::bindings::js::Root; use dom::document::Document; use dom::htmlelement::HTMLElement; use dom::node::Node; +use string_cache::Atom; use util::str::DOMString; #[dom_struct] @@ -15,7 +16,7 @@ pub struct HTMLPreElement { } impl HTMLPreElement { - fn new_inherited(localName: DOMString, + fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLPreElement { HTMLPreElement { @@ -25,7 +26,7 @@ impl HTMLPreElement { } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, + pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLPreElement> { let element = HTMLPreElement::new_inherited(localName, prefix, document); diff --git a/components/script/dom/htmlprogresselement.rs b/components/script/dom/htmlprogresselement.rs index 904055a21a0..8af60fdd1ba 100644 --- a/components/script/dom/htmlprogresselement.rs +++ b/components/script/dom/htmlprogresselement.rs @@ -9,6 +9,7 @@ use dom::document::Document; use dom::htmlelement::HTMLElement; use dom::node::Node; use dom::nodelist::NodeList; +use string_cache::Atom; use util::str::DOMString; #[dom_struct] @@ -17,7 +18,7 @@ pub struct HTMLProgressElement { } impl HTMLProgressElement { - fn new_inherited(localName: DOMString, + fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLProgressElement { HTMLProgressElement { @@ -27,7 +28,7 @@ impl HTMLProgressElement { } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, + pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLProgressElement> { let element = HTMLProgressElement::new_inherited(localName, prefix, document); diff --git a/components/script/dom/htmlquoteelement.rs b/components/script/dom/htmlquoteelement.rs index bc8df25c351..dd5b9301f71 100644 --- a/components/script/dom/htmlquoteelement.rs +++ b/components/script/dom/htmlquoteelement.rs @@ -7,6 +7,7 @@ use dom::bindings::js::Root; use dom::document::Document; use dom::htmlelement::HTMLElement; use dom::node::Node; +use string_cache::Atom; use util::str::DOMString; #[dom_struct] @@ -15,7 +16,7 @@ pub struct HTMLQuoteElement { } impl HTMLQuoteElement { - fn new_inherited(localName: DOMString, + fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLQuoteElement { HTMLQuoteElement { @@ -25,7 +26,7 @@ impl HTMLQuoteElement { } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, + pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLQuoteElement> { let element = HTMLQuoteElement::new_inherited(localName, prefix, document); diff --git a/components/script/dom/htmlscriptelement.rs b/components/script/dom/htmlscriptelement.rs index d162605baec..0d2da397406 100644 --- a/components/script/dom/htmlscriptelement.rs +++ b/components/script/dom/htmlscriptelement.rs @@ -40,6 +40,7 @@ use std::ascii::AsciiExt; use std::cell::Cell; use std::mem; use std::sync::{Arc, Mutex}; +use string_cache::Atom; use url::{Url, UrlParser}; use util::str::{DOMString, HTML_SPACE_CHARACTERS, StaticStringVec}; @@ -73,7 +74,7 @@ pub struct HTMLScriptElement { } impl HTMLScriptElement { - fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: &Document, + fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document, creator: ElementCreator) -> HTMLScriptElement { HTMLScriptElement { htmlelement: @@ -89,7 +90,7 @@ impl HTMLScriptElement { } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, prefix: Option<DOMString>, document: &Document, + pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document, creator: ElementCreator) -> Root<HTMLScriptElement> { let element = HTMLScriptElement::new_inherited(localName, prefix, document, creator); Node::reflect_node(box element, document, HTMLScriptElementBinding::Wrap) diff --git a/components/script/dom/htmlselectelement.rs b/components/script/dom/htmlselectelement.rs index 903237b46ea..a9310997851 100644 --- a/components/script/dom/htmlselectelement.rs +++ b/components/script/dom/htmlselectelement.rs @@ -32,7 +32,7 @@ pub struct HTMLSelectElement { static DEFAULT_SELECT_SIZE: u32 = 0; impl HTMLSelectElement { - fn new_inherited(localName: DOMString, + fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLSelectElement { HTMLSelectElement { @@ -43,7 +43,7 @@ impl HTMLSelectElement { } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, + pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLSelectElement> { let element = HTMLSelectElement::new_inherited(localName, prefix, document); diff --git a/components/script/dom/htmlsourceelement.rs b/components/script/dom/htmlsourceelement.rs index b28d82f32ec..37c1fbf8d11 100644 --- a/components/script/dom/htmlsourceelement.rs +++ b/components/script/dom/htmlsourceelement.rs @@ -7,6 +7,7 @@ use dom::bindings::js::Root; use dom::document::Document; use dom::htmlelement::HTMLElement; use dom::node::Node; +use string_cache::Atom; use util::str::DOMString; #[dom_struct] @@ -15,7 +16,7 @@ pub struct HTMLSourceElement { } impl HTMLSourceElement { - fn new_inherited(localName: DOMString, + fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLSourceElement { HTMLSourceElement { @@ -25,7 +26,7 @@ impl HTMLSourceElement { } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, + pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLSourceElement> { let element = HTMLSourceElement::new_inherited(localName, prefix, document); diff --git a/components/script/dom/htmlspanelement.rs b/components/script/dom/htmlspanelement.rs index 7f5d80361cb..771defdb818 100644 --- a/components/script/dom/htmlspanelement.rs +++ b/components/script/dom/htmlspanelement.rs @@ -7,6 +7,7 @@ use dom::bindings::js::Root; use dom::document::Document; use dom::htmlelement::HTMLElement; use dom::node::Node; +use string_cache::Atom; use util::str::DOMString; #[dom_struct] @@ -15,14 +16,14 @@ pub struct HTMLSpanElement { } impl HTMLSpanElement { - fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: &Document) -> HTMLSpanElement { + fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLSpanElement { HTMLSpanElement { htmlelement: HTMLElement::new_inherited(localName, prefix, document) } } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, + pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLSpanElement> { let element = HTMLSpanElement::new_inherited(localName, prefix, document); diff --git a/components/script/dom/htmlstyleelement.rs b/components/script/dom/htmlstyleelement.rs index 8eba6b5982f..4b423b920b7 100644 --- a/components/script/dom/htmlstyleelement.rs +++ b/components/script/dom/htmlstyleelement.rs @@ -15,6 +15,7 @@ use dom::node::{ChildrenMutation, Node, document_from_node, window_from_node}; use dom::virtualmethods::VirtualMethods; use layout_interface::{LayoutChan, Msg}; use std::sync::Arc; +use string_cache::Atom; use style::media_queries::parse_media_query_list; use style::stylesheets::{Origin, Stylesheet}; use util::str::DOMString; @@ -26,7 +27,7 @@ pub struct HTMLStyleElement { } impl HTMLStyleElement { - fn new_inherited(localName: DOMString, + fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLStyleElement { HTMLStyleElement { @@ -36,7 +37,7 @@ impl HTMLStyleElement { } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, + pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLStyleElement> { let element = HTMLStyleElement::new_inherited(localName, prefix, document); diff --git a/components/script/dom/htmltablecaptionelement.rs b/components/script/dom/htmltablecaptionelement.rs index 7b43fe0aece..46b841f3a43 100644 --- a/components/script/dom/htmltablecaptionelement.rs +++ b/components/script/dom/htmltablecaptionelement.rs @@ -7,6 +7,7 @@ use dom::bindings::js::Root; use dom::document::Document; use dom::htmlelement::HTMLElement; use dom::node::Node; +use string_cache::Atom; use util::str::DOMString; #[dom_struct] @@ -15,7 +16,7 @@ pub struct HTMLTableCaptionElement { } impl HTMLTableCaptionElement { - fn new_inherited(localName: DOMString, + fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLTableCaptionElement { HTMLTableCaptionElement { @@ -25,7 +26,7 @@ impl HTMLTableCaptionElement { } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, + pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLTableCaptionElement> { let element = HTMLTableCaptionElement::new_inherited(localName, prefix, document); diff --git a/components/script/dom/htmltablecellelement.rs b/components/script/dom/htmltablecellelement.rs index 25a0806b10d..f73ebd6a72c 100644 --- a/components/script/dom/htmltablecellelement.rs +++ b/components/script/dom/htmltablecellelement.rs @@ -27,7 +27,7 @@ pub struct HTMLTableCellElement { } impl HTMLTableCellElement { - pub fn new_inherited(tag_name: DOMString, + pub fn new_inherited(tag_name: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLTableCellElement { diff --git a/components/script/dom/htmltablecolelement.rs b/components/script/dom/htmltablecolelement.rs index 25ca4ed8111..53825357066 100644 --- a/components/script/dom/htmltablecolelement.rs +++ b/components/script/dom/htmltablecolelement.rs @@ -7,6 +7,7 @@ use dom::bindings::js::Root; use dom::document::Document; use dom::htmlelement::HTMLElement; use dom::node::Node; +use string_cache::Atom; use util::str::DOMString; #[dom_struct] @@ -15,7 +16,7 @@ pub struct HTMLTableColElement { } impl HTMLTableColElement { - fn new_inherited(localName: DOMString, + fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLTableColElement { HTMLTableColElement { @@ -25,7 +26,7 @@ impl HTMLTableColElement { } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, + pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLTableColElement> { let element = HTMLTableColElement::new_inherited(localName, prefix, document); diff --git a/components/script/dom/htmltabledatacellelement.rs b/components/script/dom/htmltabledatacellelement.rs index 304af9dd844..c7081466932 100644 --- a/components/script/dom/htmltabledatacellelement.rs +++ b/components/script/dom/htmltabledatacellelement.rs @@ -7,6 +7,7 @@ use dom::bindings::js::Root; use dom::document::Document; use dom::htmltablecellelement::HTMLTableCellElement; use dom::node::Node; +use string_cache::Atom; use util::str::DOMString; #[dom_struct] @@ -15,7 +16,7 @@ pub struct HTMLTableDataCellElement { } impl HTMLTableDataCellElement { - fn new_inherited(localName: DOMString, + fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLTableDataCellElement { HTMLTableDataCellElement { @@ -25,7 +26,7 @@ impl HTMLTableDataCellElement { } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, prefix: Option<DOMString>, document: &Document) + pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLTableDataCellElement> { Node::reflect_node(box HTMLTableDataCellElement::new_inherited(localName, prefix, diff --git a/components/script/dom/htmltableelement.rs b/components/script/dom/htmltableelement.rs index b4c87d54866..0de4c81fd9d 100644 --- a/components/script/dom/htmltableelement.rs +++ b/components/script/dom/htmltableelement.rs @@ -29,7 +29,7 @@ pub struct HTMLTableElement { } impl HTMLTableElement { - fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: &Document) + fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLTableElement { HTMLTableElement { htmlelement: HTMLElement::new_inherited(localName, prefix, document), @@ -40,7 +40,7 @@ impl HTMLTableElement { } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, prefix: Option<DOMString>, document: &Document) + pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLTableElement> { let element = HTMLTableElement::new_inherited(localName, prefix, document); Node::reflect_node(box element, document, HTMLTableElementBinding::Wrap) @@ -75,7 +75,7 @@ impl HTMLTableElementMethods for HTMLTableElement { let caption = match self.GetCaption() { Some(caption) => caption, None => { - let caption = HTMLTableCaptionElement::new(DOMString::from("caption"), + let caption = HTMLTableCaptionElement::new(atom!("caption"), None, document_from_node(self).r()); self.SetCaption(Some(caption.r())); @@ -94,7 +94,7 @@ impl HTMLTableElementMethods for HTMLTableElement { // https://html.spec.whatwg.org/multipage/#dom-table-createtbody fn CreateTBody(&self) -> Root<HTMLTableSectionElement> { - let tbody = HTMLTableSectionElement::new(DOMString::from("tbody"), + let tbody = HTMLTableSectionElement::new(atom!("tbody"), None, document_from_node(self).r()); let node = self.upcast::<Node>(); diff --git a/components/script/dom/htmltableheadercellelement.rs b/components/script/dom/htmltableheadercellelement.rs index 10803eadf14..dd14d75530c 100644 --- a/components/script/dom/htmltableheadercellelement.rs +++ b/components/script/dom/htmltableheadercellelement.rs @@ -7,6 +7,7 @@ use dom::bindings::js::Root; use dom::document::Document; use dom::htmltablecellelement::HTMLTableCellElement; use dom::node::Node; +use string_cache::Atom; use util::str::DOMString; #[dom_struct] @@ -15,7 +16,7 @@ pub struct HTMLTableHeaderCellElement { } impl HTMLTableHeaderCellElement { - fn new_inherited(localName: DOMString, + fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLTableHeaderCellElement { HTMLTableHeaderCellElement { @@ -25,7 +26,7 @@ impl HTMLTableHeaderCellElement { } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, + pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLTableHeaderCellElement> { let element = HTMLTableHeaderCellElement::new_inherited(localName, prefix, document); diff --git a/components/script/dom/htmltablerowelement.rs b/components/script/dom/htmltablerowelement.rs index 7f35b88c4dc..be0a9c9f5fb 100644 --- a/components/script/dom/htmltablerowelement.rs +++ b/components/script/dom/htmltablerowelement.rs @@ -37,7 +37,7 @@ pub struct HTMLTableRowElement { } impl HTMLTableRowElement { - fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: &Document) + fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLTableRowElement { HTMLTableRowElement { htmlelement: HTMLElement::new_inherited(localName, prefix, document), @@ -46,7 +46,7 @@ impl HTMLTableRowElement { } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, prefix: Option<DOMString>, document: &Document) + pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLTableRowElement> { Node::reflect_node(box HTMLTableRowElement::new_inherited(localName, prefix, document), document, @@ -76,7 +76,7 @@ impl HTMLTableRowElementMethods for HTMLTableRowElement { node.insert_cell_or_row( index, || self.Cells(), - || HTMLTableDataCellElement::new(DOMString::from("td"), None, node.owner_doc().r())) + || HTMLTableDataCellElement::new(atom!("td"), None, node.owner_doc().r())) } // https://html.spec.whatwg.org/multipage/#dom-tr-deletecell diff --git a/components/script/dom/htmltablesectionelement.rs b/components/script/dom/htmltablesectionelement.rs index 78d21d7ec86..e51caa9f30e 100644 --- a/components/script/dom/htmltablesectionelement.rs +++ b/components/script/dom/htmltablesectionelement.rs @@ -25,7 +25,7 @@ pub struct HTMLTableSectionElement { } impl HTMLTableSectionElement { - fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: &Document) + fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLTableSectionElement { HTMLTableSectionElement { htmlelement: HTMLElement::new_inherited(localName, prefix, document), @@ -33,7 +33,7 @@ impl HTMLTableSectionElement { } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, prefix: Option<DOMString>, document: &Document) + pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLTableSectionElement> { let element = HTMLTableSectionElement::new_inherited(localName, prefix, document); Node::reflect_node(box element, document, HTMLTableSectionElementBinding::Wrap) @@ -61,7 +61,7 @@ impl HTMLTableSectionElementMethods for HTMLTableSectionElement { node.insert_cell_or_row( index, || self.Rows(), - || HTMLTableRowElement::new(DOMString::from("tr"), None, node.owner_doc().r())) + || HTMLTableRowElement::new(atom!("tr"), None, node.owner_doc().r())) } // https://html.spec.whatwg.org/multipage/#dom-tbody-deleterow diff --git a/components/script/dom/htmltemplateelement.rs b/components/script/dom/htmltemplateelement.rs index 77e7843d0e5..411a46b4b90 100644 --- a/components/script/dom/htmltemplateelement.rs +++ b/components/script/dom/htmltemplateelement.rs @@ -13,6 +13,7 @@ use dom::documentfragment::DocumentFragment; use dom::htmlelement::HTMLElement; use dom::node::{CloneChildrenFlag, Node, document_from_node}; use dom::virtualmethods::VirtualMethods; +use string_cache::Atom; use util::str::DOMString; #[dom_struct] @@ -24,7 +25,7 @@ pub struct HTMLTemplateElement { } impl HTMLTemplateElement { - fn new_inherited(localName: DOMString, + fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLTemplateElement { HTMLTemplateElement { @@ -35,7 +36,7 @@ impl HTMLTemplateElement { } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, + pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLTemplateElement> { let element = HTMLTemplateElement::new_inherited(localName, prefix, document); diff --git a/components/script/dom/htmltextareaelement.rs b/components/script/dom/htmltextareaelement.rs index d4e1729f662..17155a44983 100644 --- a/components/script/dom/htmltextareaelement.rs +++ b/components/script/dom/htmltextareaelement.rs @@ -91,7 +91,7 @@ static DEFAULT_COLS: u32 = 20; static DEFAULT_ROWS: u32 = 2; impl HTMLTextAreaElement { - fn new_inherited(localName: DOMString, + fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLTextAreaElement { let chan = document.window().constellation_chan(); @@ -99,7 +99,7 @@ impl HTMLTextAreaElement { htmlelement: HTMLElement::new_inherited_with_state(IN_ENABLED_STATE, localName, prefix, document), - textinput: DOMRefCell::new(TextInput::new(Lines::Multiple, DOMString::new(), chan)), + textinput: DOMRefCell::new(TextInput::new(Lines::Multiple, DOMString::new(), chan, None)), cols: Cell::new(DEFAULT_COLS), rows: Cell::new(DEFAULT_ROWS), value_changed: Cell::new(false), @@ -107,7 +107,7 @@ impl HTMLTextAreaElement { } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, + pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLTextAreaElement> { let element = HTMLTextAreaElement::new_inherited(localName, prefix, document); diff --git a/components/script/dom/htmltimeelement.rs b/components/script/dom/htmltimeelement.rs index 93434c45685..cf261e691b7 100644 --- a/components/script/dom/htmltimeelement.rs +++ b/components/script/dom/htmltimeelement.rs @@ -7,6 +7,7 @@ use dom::bindings::js::Root; use dom::document::Document; use dom::htmlelement::HTMLElement; use dom::node::Node; +use string_cache::Atom; use util::str::DOMString; #[dom_struct] @@ -15,14 +16,14 @@ pub struct HTMLTimeElement { } impl HTMLTimeElement { - fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: &Document) -> HTMLTimeElement { + fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLTimeElement { HTMLTimeElement { htmlelement: HTMLElement::new_inherited(localName, prefix, document) } } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, + pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLTimeElement> { let element = HTMLTimeElement::new_inherited(localName, prefix, document); diff --git a/components/script/dom/htmltitleelement.rs b/components/script/dom/htmltitleelement.rs index 374074bda30..5a57a2f5cab 100644 --- a/components/script/dom/htmltitleelement.rs +++ b/components/script/dom/htmltitleelement.rs @@ -13,6 +13,7 @@ use dom::htmlelement::HTMLElement; use dom::node::{ChildrenMutation, Node}; use dom::text::Text; use dom::virtualmethods::VirtualMethods; +use string_cache::Atom; use util::str::DOMString; #[dom_struct] @@ -21,14 +22,14 @@ pub struct HTMLTitleElement { } impl HTMLTitleElement { - fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: &Document) -> HTMLTitleElement { + fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLTitleElement { HTMLTitleElement { htmlelement: HTMLElement::new_inherited(localName, prefix, document) } } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, + pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLTitleElement> { let element = HTMLTitleElement::new_inherited(localName, prefix, document); diff --git a/components/script/dom/htmltrackelement.rs b/components/script/dom/htmltrackelement.rs index 32522c18b8e..62e210e9b4e 100644 --- a/components/script/dom/htmltrackelement.rs +++ b/components/script/dom/htmltrackelement.rs @@ -7,6 +7,7 @@ use dom::bindings::js::Root; use dom::document::Document; use dom::htmlelement::HTMLElement; use dom::node::Node; +use string_cache::Atom; use util::str::DOMString; #[dom_struct] @@ -15,14 +16,14 @@ pub struct HTMLTrackElement { } impl HTMLTrackElement { - fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: &Document) -> HTMLTrackElement { + fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLTrackElement { HTMLTrackElement { htmlelement: HTMLElement::new_inherited(localName, prefix, document) } } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, + pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLTrackElement> { let element = HTMLTrackElement::new_inherited(localName, prefix, document); diff --git a/components/script/dom/htmlulistelement.rs b/components/script/dom/htmlulistelement.rs index ccbeb9fe2b3..baf4830def4 100644 --- a/components/script/dom/htmlulistelement.rs +++ b/components/script/dom/htmlulistelement.rs @@ -7,6 +7,7 @@ use dom::bindings::js::Root; use dom::document::Document; use dom::htmlelement::HTMLElement; use dom::node::Node; +use string_cache::Atom; use util::str::DOMString; #[dom_struct] @@ -15,14 +16,14 @@ pub struct HTMLUListElement { } impl HTMLUListElement { - fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: &Document) -> HTMLUListElement { + fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLUListElement { HTMLUListElement { htmlelement: HTMLElement::new_inherited(localName, prefix, document) } } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, + pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLUListElement> { let element = HTMLUListElement::new_inherited(localName, prefix, document); diff --git a/components/script/dom/htmlunknownelement.rs b/components/script/dom/htmlunknownelement.rs index e402048cc58..da2eab2fd88 100644 --- a/components/script/dom/htmlunknownelement.rs +++ b/components/script/dom/htmlunknownelement.rs @@ -7,6 +7,7 @@ use dom::bindings::js::Root; use dom::document::Document; use dom::htmlelement::HTMLElement; use dom::node::Node; +use string_cache::Atom; use util::str::DOMString; #[dom_struct] @@ -15,7 +16,7 @@ pub struct HTMLUnknownElement { } impl HTMLUnknownElement { - fn new_inherited(localName: DOMString, + fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLUnknownElement { HTMLUnknownElement { @@ -25,7 +26,7 @@ impl HTMLUnknownElement { } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, + pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLUnknownElement> { let element = HTMLUnknownElement::new_inherited(localName, prefix, document); diff --git a/components/script/dom/htmlvideoelement.rs b/components/script/dom/htmlvideoelement.rs index 6ca2028161a..f2f2fb2b5db 100644 --- a/components/script/dom/htmlvideoelement.rs +++ b/components/script/dom/htmlvideoelement.rs @@ -7,6 +7,7 @@ use dom::bindings::js::Root; use dom::document::Document; use dom::htmlmediaelement::HTMLMediaElement; use dom::node::Node; +use string_cache::Atom; use util::str::DOMString; #[dom_struct] @@ -15,7 +16,7 @@ pub struct HTMLVideoElement { } impl HTMLVideoElement { - fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: &Document) -> HTMLVideoElement { + fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLVideoElement { HTMLVideoElement { htmlmediaelement: HTMLMediaElement::new_inherited(localName, prefix, document) @@ -23,7 +24,7 @@ impl HTMLVideoElement { } #[allow(unrooted_must_root)] - pub fn new(localName: DOMString, + pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLVideoElement> { let element = HTMLVideoElement::new_inherited(localName, prefix, document); diff --git a/components/script/dom/macros.rs b/components/script/dom/macros.rs index 166b52d82d5..99b4e484752 100644 --- a/components/script/dom/macros.rs +++ b/components/script/dom/macros.rs @@ -27,6 +27,42 @@ macro_rules! make_bool_getter( ); #[macro_export] +macro_rules! make_limited_int_setter( + ($attr:ident, $htmlname:tt, $default:expr) => ( + fn $attr(&self, value: i32) -> $crate::dom::bindings::error::ErrorResult { + use dom::bindings::inheritance::Castable; + use dom::element::Element; + + let value = if value < 0 { + return Err($crate::dom::bindings::error::Error::IndexSize); + } else { + value + }; + + let element = self.upcast::<Element>(); + element.set_int_attribute(&atom!($htmlname), value); + Ok(()) + } + ); +); + +#[macro_export] +macro_rules! make_int_getter( + ($attr:ident, $htmlname:tt, $default:expr) => ( + fn $attr(&self) -> i32 { + use dom::bindings::inheritance::Castable; + use dom::element::Element; + let element = self.upcast::<Element>(); + element.get_int_attribute(&atom!($htmlname), $default) + } + ); + + ($attr:ident, $htmlname:tt) => { + make_int_getter!($attr, $htmlname, 0); + }; +); + +#[macro_export] macro_rules! make_uint_getter( ($attr:ident, $htmlname:tt, $default:expr) => ( fn $attr(&self) -> u32 { diff --git a/components/script/dom/node.rs b/components/script/dom/node.rs index 1e08cac6083..30aa8e78eea 100644 --- a/components/script/dom/node.rs +++ b/components/script/dom/node.rs @@ -51,6 +51,7 @@ use js::jsapi::{JSContext, JSObject, JSRuntime}; use layout_interface::{LayoutChan, Msg}; use libc::{self, c_void, uintptr_t}; use parse::html::parse_html_fragment; +use ref_slice::ref_slice; use script_traits::UntrustedNodeAddress; use selectors::matching::matches; use selectors::parser::Selector; @@ -61,7 +62,6 @@ use std::cmp::max; use std::default::Default; use std::iter::{self, FilterMap, Peekable}; use std::mem; -use std::slice::ref_slice; use std::sync::Arc; use string_cache::{Atom, Namespace, QualName}; use style::properties::ComputedValues; diff --git a/components/script/dom/webglrenderingcontext.rs b/components/script/dom/webglrenderingcontext.rs index d21691f14af..6655a56f921 100644 --- a/components/script/dom/webglrenderingcontext.rs +++ b/components/script/dom/webglrenderingcontext.rs @@ -378,16 +378,27 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext { #[allow(unsafe_code)] // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.5 fn BufferData(&self, _cx: *mut JSContext, target: u32, data: Option<*mut JSObject>, usage: u32) { + match target { + constants::ARRAY_BUFFER | + constants::ELEMENT_ARRAY_BUFFER => (), + _ => return self.webgl_error(InvalidEnum), + } + match usage { + constants::STREAM_DRAW | + constants::STATIC_DRAW | + constants::DYNAMIC_DRAW => (), + _ => return self.webgl_error(InvalidEnum), + } let data = match data { Some(data) => data, - None => return, + None => return self.webgl_error(InvalidValue), }; let data_vec = unsafe { let mut length = 0; let mut ptr = ptr::null_mut(); let buffer_data = JS_GetObjectAsArrayBufferView(data, &mut length, &mut ptr); if buffer_data.is_null() { - panic!("Argument data to WebGLRenderingContext.bufferdata is not a Float32Array") + return self.webgl_error(InvalidValue) // https://github.com/servo/servo/issues/5014 } let data_f32 = JS_GetFloat32ArrayData(buffer_data, ptr::null()); let data_vec_length = length / mem::size_of::<f32>() as u32; @@ -398,6 +409,56 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext { .unwrap() } + #[allow(unsafe_code)] + // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.5 + fn BufferSubData(&self, _cx: *mut JSContext, target: u32, offset: i64, data: Option<*mut JSObject>) { + match target { + constants::ARRAY_BUFFER | + constants::ELEMENT_ARRAY_BUFFER => (), + _ => return self.webgl_error(InvalidEnum), + } + let data = match data { + Some(data) => data, + None => return, + }; + if offset < 0 { + return self.webgl_error(InvalidValue); + } + let data_vec = unsafe { + let mut length = 0; + let mut ptr = ptr::null_mut(); + let buffer_data = JS_GetObjectAsArrayBufferView(data, &mut length, &mut ptr); + if buffer_data.is_null() { + return self.webgl_error(InvalidValue) // https://github.com/servo/servo/issues/5014 + } + let data_f32 = JS_GetFloat32ArrayData(buffer_data, ptr::null()); + let data_vec_length = length / mem::size_of::<f32>() as u32; + slice::from_raw_parts(data_f32, data_vec_length as usize).to_vec() + }; + // FIXME(simartin) Check that the defined region is inside the allocated one + // https://github.com/servo/servo/issues/8738 + self.ipc_renderer + .send(CanvasMsg::WebGL(CanvasWebGLMsg::BufferSubData(target, offset as isize, data_vec))) + .unwrap() + } + + // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.8 + fn CompressedTexImage2D(&self, _cx: *mut JSContext, _target: u32, _level: i32, _internal_format: u32, + _width: i32, _height: i32, _border: i32, _pixels: *mut JSObject) { + // FIXME: No compressed texture format is currently supported, so error out as per + // https://www.khronos.org/registry/webgl/specs/latest/1.0/#COMPRESSED_TEXTURE_SUPPORT + self.webgl_error(InvalidEnum) + } + + // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.8 + fn CompressedTexSubImage2D(&self, _cx: *mut JSContext, _target: u32, _level: i32, + _xoffset: i32, _yoffset: i32, _width: i32, _height: i32, + _format: u32, _pixels: *mut JSObject) { + // FIXME: No compressed texture format is currently supported, so error out as per + // https://www.khronos.org/registry/webgl/specs/latest/1.0/#COMPRESSED_TEXTURE_SUPPORT + self.webgl_error(InvalidEnum) + } + // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.11 fn Clear(&self, mask: u32) { self.ipc_renderer.send(CanvasMsg::WebGL(CanvasWebGLMsg::Clear(mask))).unwrap(); diff --git a/components/script/dom/webidls/Document.webidl b/components/script/dom/webidls/Document.webidl index 69cb136749f..10199205537 100644 --- a/components/script/dom/webidls/Document.webidl +++ b/components/script/dom/webidls/Document.webidl @@ -79,7 +79,7 @@ enum DocumentReadyState { "loading", "interactive", "complete" }; // [OverrideBuiltins] partial /*sealed*/ interface Document { // resource metadata management - // [PutForwards=href, Unforgeable] + [/*PutForwards=href, */Unforgeable] readonly attribute Location/*?*/ location; readonly attribute DOMString domain; // readonly attribute DOMString referrer; diff --git a/components/script/dom/webidls/HTMLInputElement.webidl b/components/script/dom/webidls/HTMLInputElement.webidl index a5472818afe..274a10ce957 100644 --- a/components/script/dom/webidls/HTMLInputElement.webidl +++ b/components/script/dom/webidls/HTMLInputElement.webidl @@ -25,7 +25,8 @@ interface HTMLInputElement : HTMLElement { // attribute DOMString inputMode; //readonly attribute HTMLElement? list; // attribute DOMString max; - // attribute long maxLength; + [SetterThrows] + attribute long maxLength; // attribute DOMString min; // attribute long minLength; // attribute boolean multiple; diff --git a/components/script/dom/webidls/Location.webidl b/components/script/dom/webidls/Location.webidl index f82031ac74b..8af05fbd178 100644 --- a/components/script/dom/webidls/Location.webidl +++ b/components/script/dom/webidls/Location.webidl @@ -4,7 +4,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#location -/*[Unforgeable]*/ interface Location { +[Unforgeable] interface Location { /*stringifier*/ attribute USVString href; // attribute USVString origin; attribute USVString protocol; diff --git a/components/script/dom/webidls/WebGLRenderingContext.webidl b/components/script/dom/webidls/WebGLRenderingContext.webidl index 27019ed7754..cd1937e4430 100644 --- a/components/script/dom/webidls/WebGLRenderingContext.webidl +++ b/components/script/dom/webidls/WebGLRenderingContext.webidl @@ -492,10 +492,11 @@ interface WebGLRenderingContextBase //void bufferData(GLenum target, GLsizeiptr size, GLenum usage); // FIXME(dmarcos) The function below is the original function in the webIdl: // void bufferData(GLenum target, BufferDataSource? data, GLenum usage); - // The Code genearator doesn't handle BufferDataSource so we're using 'optional object' + // The Code generator doesn't handle BufferDataSource so we're using 'optional object' // in the meantime void bufferData(GLenum target, optional object data, GLenum usage); //void bufferSubData(GLenum target, GLintptr offset, BufferDataSource? data); + void bufferSubData(GLenum target, GLintptr offset, optional object data); //[WebGLHandlesContextLoss] GLenum checkFramebufferStatus(GLenum target); void clear(GLbitfield mask); @@ -505,13 +506,22 @@ interface WebGLRenderingContextBase void colorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); void compileShader(WebGLShader? shader); - //void compressedTexImage2D(GLenum target, GLint level, GLenum internalformat, - // GLsizei width, GLsizei height, GLint border, - // ArrayBufferView data); - //void compressedTexSubImage2D(GLenum target, GLint level, - // GLint xoffset, GLint yoffset, - // GLsizei width, GLsizei height, GLenum format, - // ArrayBufferView data); + // FIXME(simartin) The Code generator doesn't handle ArrayBufferView so we're + // using 'object' in the meantime + // void compressedTexImage2D(GLenum target, GLint level, GLenum internalformat, + // GLsizei width, GLsizei height, GLint border, + // ArrayBufferView data); + void compressedTexImage2D(GLenum target, GLint level, GLenum internalformat, + GLsizei width, GLsizei height, GLint border, + object data); + // void compressedTexSubImage2D(GLenum target, GLint level, + // GLint xoffset, GLint yoffset, + // GLsizei width, GLsizei height, GLenum format, + // ArrayBufferView data); + void compressedTexSubImage2D(GLenum target, GLint level, + GLint xoffset, GLint yoffset, + GLsizei width, GLsizei height, GLenum format, + object data); //void copyTexImage2D(GLenum target, GLint level, GLenum internalformat, // GLint x, GLint y, GLsizei width, GLsizei height, diff --git a/components/script/dom/webidls/Window.webidl b/components/script/dom/webidls/Window.webidl index 82a2f3fd34f..21ac6bf31a8 100644 --- a/components/script/dom/webidls/Window.webidl +++ b/components/script/dom/webidls/Window.webidl @@ -11,9 +11,9 @@ //[Replaceable] readonly attribute WindowProxy self; readonly attribute Window window; [BinaryName="Self_"] readonly attribute Window self; - /*[Unforgeable]*/ readonly attribute Document document; + [Unforgeable] readonly attribute Document document; // attribute DOMString name; - /*[PutForwards=href, Unforgeable]*/ readonly attribute Location location; + [/*PutForwards=href, */Unforgeable] readonly attribute Location location; //readonly attribute History history; //[Replaceable] readonly attribute BarProp locationbar; //[Replaceable] readonly attribute BarProp menubar; diff --git a/components/script/dom/websocket.rs b/components/script/dom/websocket.rs index f2060566877..d75662c157e 100644 --- a/components/script/dom/websocket.rs +++ b/components/script/dom/websocket.rs @@ -27,12 +27,13 @@ use js::jsapi::{JS_GetArrayBufferData, JS_NewArrayBuffer}; use js::jsval::UndefinedValue; use libc::{uint32_t, uint8_t}; use net_traits::hosts::replace_hosts; +use ref_slice::ref_slice; use script_task::ScriptTaskEventCategory::WebSocketEvent; use script_task::{CommonScriptMsg, Runnable}; use std::borrow::ToOwned; use std::cell::Cell; +use std::ptr; use std::sync::{Arc, Mutex}; -use std::{ptr, slice}; use util::str::DOMString; use util::task::spawn_named; use websocket::client::receiver::Receiver; @@ -126,6 +127,24 @@ const BLOCKED_PORTS_LIST: &'static [u16] = &[ 6000, // x11 ]; +// Close codes defined in https://tools.ietf.org/html/rfc6455#section-7.4.1 +// Names are from https://github.com/mozilla/gecko-dev/blob/master/netwerk/protocol/websocket/nsIWebSocketChannel.idl +#[allow(dead_code)] +mod close_code { + pub const NORMAL: u16 = 1000; + pub const GOING_AWAY: u16 = 1001; + pub const PROTOCOL_ERROR: u16 = 1002; + pub const UNSUPPORTED_DATATYPE: u16 = 1003; + pub const NO_STATUS: u16 = 1005; + pub const ABNORMAL: u16 = 1006; + pub const INVALID_PAYLOAD: u16 = 1007; + pub const POLICY_VIOLATION: u16 = 1008; + pub const TOO_LARGE: u16 = 1009; + pub const EXTENSION_MISSING: u16 = 1010; + pub const INTERNAL_ERROR: u16 = 1011; + pub const TLS_FAILED: u16 = 1015; +} + #[dom_struct] pub struct WebSocket { eventtarget: EventTarget, @@ -212,7 +231,7 @@ impl WebSocket { // Step 4. let protocols: &[DOMString] = protocols .as_ref() - .map_or(&[], |ref string| slice::ref_slice(string)); + .map_or(&[], |ref string| ref_slice(string)); // Step 5. for (i, protocol) in protocols.iter().enumerate() { @@ -430,8 +449,8 @@ impl WebSocketMethods for WebSocket { if let Some(code) = code { - //Check code is NOT 1000 NOR in the range of 3000-4999 (inclusive) - if code != 1000 && (code < 3000 || code > 4999) { + //Fail if the supplied code isn't normal and isn't reserved for libraries, frameworks, and applications + if code != close_code::NORMAL && (code < 3000 || code > 4999) { return Err(Error::InvalidAccess); } } @@ -454,9 +473,7 @@ impl WebSocketMethods for WebSocket { WebSocketRequestState::Open => { //Closing handshake not started - still in open //Start the closing by setting the code and reason if they exist - if let Some(code) = code { - self.code.set(code); - } + self.code.set(code.unwrap_or(close_code::NO_STATUS)); if let Some(reason) = reason { *self.reason.borrow_mut() = reason.0; } diff --git a/components/script/dom/xmldocument.rs b/components/script/dom/xmldocument.rs index 0553760ca6c..6f73ecbf8ea 100644 --- a/components/script/dom/xmldocument.rs +++ b/components/script/dom/xmldocument.rs @@ -12,6 +12,7 @@ use dom::bindings::inheritance::Castable; use dom::bindings::js::{Root, RootedReference}; use dom::bindings::reflector::{Reflectable, reflect_dom_object}; use dom::document::{Document, DocumentSource, IsHTMLDocument}; +use dom::location::Location; use dom::node::Node; use dom::window::Window; use js::jsapi::{JSContext, JSObject}; @@ -85,6 +86,11 @@ impl XMLDocument { } impl XMLDocumentMethods for XMLDocument { + // https://html.spec.whatwg.org/multipage/#dom-document-location + fn Location(&self) -> Root<Location> { + self.document.Location() + } + // https://html.spec.whatwg.org/multipage/#dom-tree-accessors:supported-property-names fn SupportedPropertyNames(&self) -> Vec<DOMString> { self.document.SupportedPropertyNames() diff --git a/components/script/dom/xmlhttprequest.rs b/components/script/dom/xmlhttprequest.rs index 24a93225d2b..24bd012f105 100644 --- a/components/script/dom/xmlhttprequest.rs +++ b/components/script/dom/xmlhttprequest.rs @@ -995,20 +995,9 @@ impl XMLHttpRequest { } } - //FIXME: add support for override_mime_type and override_charset + //FIXME: add support for XML encoding guess stuff using XML spec fn text_response(&self) -> String { - let mut encoding = UTF_8 as EncodingRef; - match self.response_headers.borrow().get() { - Some(&ContentType(mime::Mime(_, _, ref params))) => { - for &(ref name, ref value) in params { - if name == &mime::Attr::Charset { - encoding = encoding_from_whatwg_label(&value.to_string()).unwrap_or(encoding); - } - } - }, - None => {} - } - + let encoding = self.final_charset().unwrap_or(UTF_8); // According to Simon, decode() should never return an error, so unwrap()ing // the result should be fine. XXXManishearth have a closer look at this later @@ -1102,6 +1091,34 @@ impl XMLHttpRequest { } Ok(()) } + + fn final_charset(&self) -> Option<EncodingRef> { + if self.override_charset.borrow().is_some() { + self.override_charset.borrow().clone() + } else { + match self.response_headers.borrow().get() { + Some(&ContentType(ref mime)) => { + let value = mime.get_param(mime::Attr::Charset); + value.and_then(|value|{ + encoding_from_whatwg_label(value) + }) + } + None => { None } + } + } + } + + #[allow(dead_code)] + fn final_mime_type(&self) -> Option<Mime> { + if self.override_mime_type.borrow().is_some() { + self.override_mime_type.borrow().clone() + } else { + match self.response_headers.borrow().get() { + Some(&ContentType(ref mime)) => { Some(mime.clone()) }, + None => { None } + } + } + } } trait Extractable { diff --git a/components/script/lib.rs b/components/script/lib.rs index 583f837bfbf..f652100bc49 100644 --- a/components/script/lib.rs +++ b/components/script/lib.rs @@ -20,7 +20,6 @@ #![feature(nonzero)] #![feature(on_unimplemented)] #![feature(plugin)] -#![feature(ref_slice)] #![feature(slice_patterns)] #![feature(str_utf16)] #![feature(unicode)] @@ -61,6 +60,7 @@ extern crate offscreen_gl_context; #[macro_use] extern crate profile_traits; extern crate rand; +extern crate ref_slice; extern crate rustc_serialize; extern crate rustc_unicode; extern crate script_traits; diff --git a/components/script/textinput.rs b/components/script/textinput.rs index aa970e27464..b5bd6421127 100644 --- a/components/script/textinput.rs +++ b/components/script/textinput.rs @@ -11,6 +11,7 @@ use msg::constellation_msg::{Key, KeyModifiers}; use std::borrow::ToOwned; use std::cmp::{max, min}; use std::default::Default; +use std::usize; use util::mem::HeapSizeOf; use util::str::DOMString; @@ -41,6 +42,7 @@ pub struct TextInput<T: ClipboardProvider> { multiline: bool, #[ignore_heap_size_of = "Can't easily measure this generic type"] clipboard_provider: T, + pub max_length: Option<usize> } /// Resulting action to be taken by the owner of a text input that is handling an event. @@ -107,13 +109,14 @@ fn is_printable_key(key: Key) -> bool { impl<T: ClipboardProvider> TextInput<T> { /// Instantiate a new text input control - pub fn new(lines: Lines, initial: DOMString, clipboard_provider: T) -> TextInput<T> { + pub fn new(lines: Lines, initial: DOMString, clipboard_provider: T, max_length: Option<usize>) -> TextInput<T> { let mut i = TextInput { lines: vec!(), edit_point: Default::default(), selection_begin: None, multiline: lines == Lines::Multiple, - clipboard_provider: clipboard_provider + clipboard_provider: clipboard_provider, + max_length: max_length }; i.set_content(initial); i @@ -133,7 +136,7 @@ impl<T: ClipboardProvider> TextInput<T> { } /// Insert a string at the current editing point - fn insert_string<S: Into<String>>(&mut self, s: S) { + pub fn insert_string<S: Into<String>>(&mut self, s: S) { if self.selection_begin.is_none() { self.selection_begin = Some(self.edit_point); } @@ -170,8 +173,40 @@ impl<T: ClipboardProvider> TextInput<T> { }) } + fn selection_len(&self) -> usize { + if let Some((begin, end)) = self.get_sorted_selection() { + let prefix = &self.lines[begin.line][0..begin.index]; + let suffix = &self.lines[end.line][end.index..]; + let lines_prefix = &self.lines[..begin.line]; + let lines_suffix = &self.lines[end.line + 1..]; + + self.len() - (prefix.chars().count() + + suffix.chars().count() + + lines_prefix.iter().fold(0, |m, i| m + i.chars().count() + 1) + + lines_suffix.iter().fold(0, |m, i| m + i.chars().count() + 1)) + } else { + 0 + } + } + pub fn replace_selection(&mut self, insert: DOMString) { if let Some((begin, end)) = self.get_sorted_selection() { + let allowed_to_insert_count = if let Some(max_length) = self.max_length { + let len_after_selection_replaced = self.len() - self.selection_len(); + if len_after_selection_replaced > max_length { + // If, after deleting the selection, the len is still greater than the max + // length, then don't delete/insert anything + return + } + + max_length - len_after_selection_replaced + } else { + usize::MAX + }; + + let last_char_to_insert = min(allowed_to_insert_count, insert.chars().count()); + let chars_to_insert = (&insert[0 .. last_char_to_insert]).to_owned(); + self.clear_selection(); let new_lines = { @@ -181,13 +216,14 @@ impl<T: ClipboardProvider> TextInput<T> { let lines_suffix = &self.lines[end.line + 1..]; let mut insert_lines = if self.multiline { - insert.split('\n').map(DOMString::from).collect() + chars_to_insert.split('\n').map(|s| DOMString::from(s.to_owned())).collect() } else { - vec!(insert) + vec!(DOMString::from(chars_to_insert)) }; // FIXME(ajeffrey): effecient append for DOMStrings let mut new_line = prefix.to_owned(); + new_line.push_str(&insert_lines[0]); insert_lines[0] = DOMString::from(new_line); @@ -434,6 +470,12 @@ impl<T: ClipboardProvider> TextInput<T> { } } + pub fn len(&self) -> usize { + self.lines.iter().fold(0, |m, l| { + m + l.len() + 1 + }) - 1 + } + /// Get the current contents of the text input. Multiple lines are joined by \n. pub fn get_content(&self) -> DOMString { let mut content = "".to_owned(); diff --git a/components/script_traits/Cargo.toml b/components/script_traits/Cargo.toml index 2da8a6b81aa..4181c32508c 100644 --- a/components/script_traits/Cargo.toml +++ b/components/script_traits/Cargo.toml @@ -31,7 +31,7 @@ git = "https://github.com/servo/ipc-channel" [dependencies] app_units = {version = "0.1", features = ["plugins"]} libc = "0.2" -euclid = {version = "0.3", features = ["plugins"]} +euclid = {version = "0.4", features = ["plugins"]} serde = "0.6" serde_macros = "0.6" time = "0.1.12" diff --git a/components/servo/Cargo.lock b/components/servo/Cargo.lock index cf0e7b9ccca..30481c37b8d 100644 --- a/components/servo/Cargo.lock +++ b/components/servo/Cargo.lock @@ -10,18 +10,18 @@ dependencies = [ "devtools 0.0.1", "devtools_traits 0.0.1", "env_logger 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "gaol 0.0.1 (git+https://github.com/pcwalton/gaol)", "gfx 0.0.1", "gfx_tests 0.0.1", - "gleam 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", + "gleam 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", "glutin_app 0.0.1", "image 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.1.0 (git+https://github.com/servo/ipc-channel)", - "layers 0.1.0 (git+https://github.com/servo/rust-layers)", + "layers 0.2.0 (git+https://github.com/servo/rust-layers)", "layout 0.0.1", "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "msg 0.0.1", "net 0.0.1", "net_tests 0.0.1", @@ -75,10 +75,10 @@ dependencies = [ [[package]] name = "app_units" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -92,22 +92,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "azure" version = "0.2.0" -source = "git+https://github.com/servo/rust-azure#5a5701c269cb7cb65f6c690122ef75c268f8d44d" +source = "git+https://github.com/servo/rust-azure#a835f8578737034d48762b379f19a92bb2882cc0" dependencies = [ - "core-foundation 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "core-graphics 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "core-graphics 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "core-text 0.1.0 (git+https://github.com/servo/core-text-rs)", - "egl 0.2.0 (git+https://github.com/servo/rust-egl)", - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "freetype 0.1.0 (git+https://github.com/servo/rust-freetype)", - "freetype-sys 2.4.11 (git+https://github.com/servo/libfreetype2)", - "heapsize 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "heapsize 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize_plugin 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "skia 0.0.20130412 (git+https://github.com/servo/skia)", - "x11 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "servo-egl 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "servo-freetype-sys 2.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "servo-skia 0.20130412.2 (registry+https://github.com/rust-lang/crates.io-index)", + "x11 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -156,12 +156,12 @@ dependencies = [ "azure 0.2.0 (git+https://github.com/servo/rust-azure)", "canvas_traits 0.0.1", "cssparser 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "gfx_traits 0.0.1", - "gleam 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", + "gleam 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.1.0 (git+https://github.com/servo/ipc-channel)", - "layers 0.1.0 (git+https://github.com/servo/rust-layers)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "layers 0.2.0 (git+https://github.com/servo/rust-layers)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "num 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", "offscreen_gl_context 0.1.0 (git+https://github.com/ecoal95/rust-offscreen-rendering-context)", "plugins 0.0.1", @@ -174,10 +174,10 @@ version = "0.0.1" dependencies = [ "azure 0.2.0 (git+https://github.com/servo/rust-azure)", "cssparser 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "gfx_traits 0.0.1", "ipc-channel 0.1.0 (git+https://github.com/servo/ipc-channel)", - "layers 0.1.0 (git+https://github.com/servo/rust-layers)", + "layers 0.2.0 (git+https://github.com/servo/rust-layers)", "offscreen_gl_context 0.1.0 (git+https://github.com/ecoal95/rust-offscreen-rendering-context)", "plugins 0.0.1", "serde 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -204,21 +204,20 @@ name = "cgl" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "gleam 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", + "gleam 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "clipboard" -version = "0.0.3" -source = "git+https://github.com/aweinstock314/rust-clipboard#ef4cf77c9c736e0951df797ff4e1a7c945ce2e34" +version = "0.1.0" +source = "git+https://github.com/aweinstock314/rust-clipboard#4510d16e640fb52be1cd476557d52f69fa589196" dependencies = [ "clipboard-win 1.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "objc 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "objc-foundation 0.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "objc_id 0.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "x11 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "x11 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -242,11 +241,11 @@ dependencies = [ [[package]] name = "cocoa" -version = "0.1.5" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "core-graphics 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "core-graphics 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "objc 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -260,25 +259,25 @@ source = "registry+https://github.com/rust-lang/crates.io-index" name = "compositing" version = "0.0.1" dependencies = [ - "app_units 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "app_units 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "azure 0.2.0 (git+https://github.com/servo/rust-azure)", "canvas 0.0.1", "canvas_traits 0.0.1", - "clipboard 0.0.3 (git+https://github.com/aweinstock314/rust-clipboard)", - "core-graphics 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "clipboard 0.1.0 (git+https://github.com/aweinstock314/rust-clipboard)", + "core-graphics 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "core-text 0.1.0 (git+https://github.com/servo/core-text-rs)", "devtools_traits 0.0.1", - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "gaol 0.0.1 (git+https://github.com/pcwalton/gaol)", "gfx 0.0.1", "gfx_traits 0.0.1", - "gleam 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", + "gleam 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", "image 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.1.0 (git+https://github.com/servo/ipc-channel)", - "layers 0.1.0 (git+https://github.com/servo/rust-layers)", + "layers 0.2.0 (git+https://github.com/servo/rust-layers)", "layout_traits 0.0.1", "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "msg 0.0.1", "net_traits 0.0.1", "num 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", @@ -307,7 +306,16 @@ dependencies = [ [[package]] name = "core-foundation" -version = "0.1.0" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "core-foundation-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "core-foundation-sys" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -315,10 +323,10 @@ dependencies = [ [[package]] name = "core-graphics" -version = "0.1.1" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "core-foundation 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -327,8 +335,8 @@ name = "core-text" version = "0.1.0" source = "git+https://github.com/servo/core-text-rs#d97cd4ae33509857f956e64c71f43cc71c98430f" dependencies = [ - "core-foundation 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "core-graphics 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "core-graphics 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -363,7 +371,7 @@ dependencies = [ "devtools_traits 0.0.1", "hyper 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.1.0 (git+https://github.com/servo/ipc-channel)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "msg 0.0.1", "plugins 0.0.1", "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", @@ -417,14 +425,6 @@ dependencies = [ ] [[package]] -name = "egl" -version = "0.2.0" -source = "git+https://github.com/servo/rust-egl#c59c59f6dc252e2ab17103b045d7ab1e452f32da" -dependencies = [ - "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] name = "encoding" version = "0.2.32" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -527,18 +527,18 @@ name = "env_logger" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "regex 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "euclid" -version = "0.3.2" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "heapsize 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "heapsize 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize_plugin 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "num 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", @@ -548,9 +548,10 @@ dependencies = [ [[package]] name = "expat-sys" -version = "2.1.0" -source = "git+https://github.com/servo/libexpat#b4fdb7a2c9825bdeafcd32ac43560e31ca839649" +version = "2.1.1-really.0" +source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ + "make-cmd 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -569,25 +570,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "fontconfig" -version = "0.1.0" -source = "git+https://github.com/servo/rust-fontconfig#5ad2ec0436036cd8151f7e03b637d89470daba91" -dependencies = [ - "fontconfig-sys 2.11.1 (git+https://github.com/servo/libfontconfig)", - "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "fontconfig-sys" -version = "2.11.1" -source = "git+https://github.com/servo/libfontconfig#3f93fab726d951a506fd318b359912b4bdcd2e35" -dependencies = [ - "expat-sys 2.1.0 (git+https://github.com/servo/libexpat)", - "freetype-sys 2.4.11 (git+https://github.com/servo/libfreetype2)", - "pkg-config 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] name = "freetype" version = "0.1.0" source = "git+https://github.com/servo/rust-freetype#d564ff90a3c69d987f5c015d7ec034cfaee21aff" @@ -596,14 +578,6 @@ dependencies = [ ] [[package]] -name = "freetype-sys" -version = "2.4.11" -source = "git+https://github.com/servo/libfreetype2#237f95bae7536bae7fcfbbc65dba7285f422b90f" -dependencies = [ - "pkg-config 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] name = "futf" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -618,7 +592,7 @@ version = "0.0.1" source = "git+https://github.com/pcwalton/gaol#71865ff8a1824cbc1cbee4d388d56c5ba1b5ffc2" dependencies = [ "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -648,24 +622,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index" name = "gfx" version = "0.0.1" dependencies = [ - "app_units 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "app_units 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "azure 0.2.0 (git+https://github.com/servo/rust-azure)", "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "canvas_traits 0.0.1", - "core-foundation 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "core-graphics 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "core-graphics 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "core-text 0.1.0 (git+https://github.com/servo/core-text-rs)", - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "fontconfig 0.1.0 (git+https://github.com/servo/rust-fontconfig)", "freetype 0.1.0 (git+https://github.com/servo/rust-freetype)", "gfx_traits 0.0.1", "harfbuzz-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.1.0 (git+https://github.com/servo/ipc-channel)", - "layers 0.1.0 (git+https://github.com/servo/rust-layers)", + "layers 0.2.0 (git+https://github.com/servo/rust-layers)", "lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "msg 0.0.1", "net_traits 0.0.1", "plugins 0.0.1", @@ -675,8 +648,9 @@ dependencies = [ "script_traits 0.0.1", "serde 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "servo-fontconfig 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "servo-skia 0.20130412.2 (registry+https://github.com/rust-lang/crates.io-index)", "simd 0.1.0 (git+https://github.com/huonw/simd)", - "skia 0.0.20130412 (git+https://github.com/servo/skia)", "smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "style 0.0.1", @@ -719,22 +693,21 @@ dependencies = [ [[package]] name = "gl_generator" -version = "0.2.0" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "khronos_api 0.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "xml-rs 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", + "khronos_api 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "xml-rs 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "gleam" -version = "0.1.19" +version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "gl_generator 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "khronos_api 0.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "gl_generator 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "khronos_api 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -743,66 +716,34 @@ version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "glutin" -version = "0.4.2" -source = "git+https://github.com/servo/glutin?branch=servo#f04bc869a37752d3d4a4258660428a360588e3a7" -dependencies = [ - "android_glue 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "cgl 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cocoa 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "core-foundation 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "core-graphics 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "dwmapi-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "gdi32-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "gl_common 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "gl_generator 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "kernel32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "khronos_api 0.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "objc 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "osmesa-sys 0.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "shared_library 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "shell32-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "user32-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "wayland-client 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "wayland-kbd 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "wayland-window 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", - "x11 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "x11-dl 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] name = "glutin_app" version = "0.0.1" dependencies = [ "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "cgl 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "compositing 0.0.1", - "egl 0.2.0 (git+https://github.com/servo/rust-egl)", - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "gleam 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", - "glutin 0.4.2 (git+https://github.com/servo/glutin?branch=servo)", - "layers 0.1.0 (git+https://github.com/servo/rust-layers)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "gleam 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", + "layers 0.2.0 (git+https://github.com/servo/rust-layers)", "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "msg 0.0.1", "net_traits 0.0.1", "script_traits 0.0.1", + "servo-egl 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "servo-glutin 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", "url 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "util 0.0.1", - "x11 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "x11 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "glx" -version = "0.0.1" -source = "git+https://github.com/servo/rust-glx#75ed2359f50c16c60f871e2f5f146e2016d8453d" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "gl_common 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "gl_generator 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "khronos_api 0.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "gl_generator 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "khronos_api 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -844,10 +785,10 @@ dependencies = [ [[package]] name = "heapsize" -version = "0.1.2" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -860,7 +801,7 @@ name = "hpack" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -868,7 +809,7 @@ name = "html5ever" version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "mac 0.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "phf 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)", "phf_codegen 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -892,7 +833,7 @@ dependencies = [ "cookie 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "httparse 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "language-tags 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "mime 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", "openssl 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -927,12 +868,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "io-surface" version = "0.1.1" -source = "git+https://github.com/servo/io-surface-rs#aaaa5da1f2d75958fc1a3a06648717be4ea08283" +source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cgl 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "core-foundation 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "gleam 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "gleam 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -954,11 +895,11 @@ dependencies = [ [[package]] name = "js" version = "0.1.1" -source = "git+https://github.com/servo/rust-mozjs#d712414c8b1cab4672d88ec0f4861c9768ea27d7" +source = "git+https://github.com/servo/rust-mozjs#6bfe259e0adc51ceabeb95d3af87d9041d16a767" dependencies = [ - "heapsize 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "heapsize 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "mozjs_sys 0.0.0 (git+https://github.com/servo/mozjs)", "num 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", @@ -975,7 +916,7 @@ dependencies = [ [[package]] name = "khronos_api" -version = "0.0.8" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -985,29 +926,29 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "layers" -version = "0.1.0" -source = "git+https://github.com/servo/rust-layers#82672814604f5e4293fcc9d2f89055a85ad87c11" +version = "0.2.0" +source = "git+https://github.com/servo/rust-layers#c4efb24deb170908a534ae916d23890f85725b17" dependencies = [ "azure 0.2.0 (git+https://github.com/servo/rust-azure)", "cgl 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "core-foundation 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "egl 0.2.0 (git+https://github.com/servo/rust-egl)", - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "gleam 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", - "glx 0.0.1 (git+https://github.com/servo/rust-glx)", - "io-surface 0.1.1 (git+https://github.com/servo/io-surface-rs)", + "core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "gleam 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", + "glx 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "io-surface 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", - "skia 0.0.20130412 (git+https://github.com/servo/skia)", - "x11 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "servo-egl 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "servo-skia 0.20130412.2 (registry+https://github.com/rust-lang/crates.io-index)", + "x11 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "layout" version = "0.0.1" dependencies = [ - "app_units 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "app_units 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "azure 0.2.0 (git+https://github.com/servo/rust-azure)", "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "canvas 0.0.1", @@ -1015,14 +956,14 @@ dependencies = [ "clock_ticks 0.1.0 (git+https://github.com/tomaka/clock_ticks)", "cssparser 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "gfx 0.0.1", "gfx_traits 0.0.1", "ipc-channel 0.1.0 (git+https://github.com/servo/ipc-channel)", "layout_traits 0.0.1", "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "msg 0.0.1", "net_traits 0.0.1", "plugins 0.0.1", @@ -1048,7 +989,7 @@ dependencies = [ name = "layout_traits" version = "0.0.1" dependencies = [ - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "gfx 0.0.1", "ipc-channel 0.1.0 (git+https://github.com/servo/ipc-channel)", "msg 0.0.1", @@ -1096,10 +1037,10 @@ dependencies = [ [[package]] name = "log" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1113,6 +1054,11 @@ version = "0.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] +name = "make-cmd" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] name = "malloc_buf" version = "0.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1138,7 +1084,7 @@ name = "mime" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1180,16 +1126,16 @@ dependencies = [ name = "msg" version = "0.0.1" dependencies = [ - "app_units 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "app_units 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "azure 0.2.0 (git+https://github.com/servo/rust-azure)", "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "canvas_traits 0.0.1", - "core-foundation 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "io-surface 0.1.1 (git+https://github.com/servo/io-surface-rs)", + "io-surface 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.1.0 (git+https://github.com/servo/ipc-channel)", - "layers 0.1.0 (git+https://github.com/servo/rust-layers)", + "layers 0.2.0 (git+https://github.com/servo/rust-layers)", "offscreen_gl_context 0.1.0 (git+https://github.com/ecoal95/rust-offscreen-rendering-context)", "plugins 0.0.1", "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1207,11 +1153,11 @@ dependencies = [ "brotli 0.3.17 (git+https://github.com/ende76/brotli-rs)", "cookie 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "devtools_traits 0.0.1", - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "flate2 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.1.0 (git+https://github.com/servo/ipc-channel)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "mime_guess 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "msg 0.0.1", "net_traits 0.0.1", @@ -1258,11 +1204,11 @@ dependencies = [ name = "net_traits" version = "0.0.1" dependencies = [ - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "image 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.1.0 (git+https://github.com/servo/ipc-channel)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "msg 0.0.1", "plugins 0.0.1", "serde 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1327,21 +1273,20 @@ dependencies = [ [[package]] name = "offscreen_gl_context" version = "0.1.0" -source = "git+https://github.com/ecoal95/rust-offscreen-rendering-context#922819338946a3fa26a8ae49dc34cc1ede8b3705" +source = "git+https://github.com/ecoal95/rust-offscreen-rendering-context#483abed6709570cb0930e6427455cd453363ffcd" dependencies = [ "cgl 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "core-foundation 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "gl_generator 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "gleam 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", - "glutin 0.4.2 (git+https://github.com/servo/glutin?branch=servo)", - "khronos_api 0.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "layers 0.1.0 (git+https://github.com/servo/rust-layers)", - "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "gl_generator 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "gleam 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", + "khronos_api 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "layers 0.2.0 (git+https://github.com/servo/rust-layers)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "x11 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "servo-glutin 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "x11 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1466,7 +1411,7 @@ dependencies = [ "hbs-pow 0.1.0 (git+https://github.com/libheartbeats/heartbeats-simple-rust.git)", "ipc-channel 0.1.0 (git+https://github.com/servo/ipc-channel)", "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "plugins 0.0.1", "profile_traits 0.0.1", "regex 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1534,6 +1479,11 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] +name = "ref_slice" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] name = "regex" version = "0.1.41" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1558,7 +1508,7 @@ name = "script" version = "0.0.1" dependencies = [ "angle 0.1.0 (git+https://github.com/ecoal95/angle?branch=servo)", - "app_units 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "app_units 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "canvas 0.0.1", "canvas_traits 0.0.1", @@ -1566,7 +1516,7 @@ dependencies = [ "cssparser 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "devtools_traits 0.0.1", "encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "html5ever 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1574,7 +1524,7 @@ dependencies = [ "ipc-channel 0.1.0 (git+https://github.com/servo/ipc-channel)", "js 0.1.1 (git+https://github.com/servo/rust-mozjs)", "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "msg 0.0.1", "net_traits 0.0.1", "num 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1582,6 +1532,7 @@ dependencies = [ "plugins 0.0.1", "profile_traits 0.0.1", "rand 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)", + "ref_slice 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", "script_traits 0.0.1", "selectors 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1613,9 +1564,9 @@ dependencies = [ name = "script_traits" version = "0.0.1" dependencies = [ - "app_units 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "app_units 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "devtools_traits 0.0.1", - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.1.0 (git+https://github.com/servo/ipc-channel)", "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "msg 0.0.1", @@ -1679,6 +1630,91 @@ dependencies = [ ] [[package]] +name = "servo-egl" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "servo-fontconfig" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "servo-fontconfig-sys 2.11.2-really.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "servo-fontconfig-sys" +version = "2.11.2-really.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "expat-sys 2.1.1-really.0 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "servo-freetype-sys 2.4.11 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "servo-freetype-sys" +version = "2.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "pkg-config 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "servo-glutin" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "android_glue 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "cgl 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cocoa 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "core-graphics 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "dwmapi-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "gdi32-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "gl_common 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "gl_generator 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "kernel32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "khronos_api 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "objc 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "osmesa-sys 0.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "shared_library 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "shell32-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "user32-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "wayland-client 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "wayland-kbd 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "wayland-window 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "x11 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "x11-dl 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "servo-skia" +version = "0.20130412.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cgl 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "expat-sys 2.1.1-really.0 (registry+https://github.com/rust-lang/crates.io-index)", + "gleam 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", + "glx 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "io-surface 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "servo-egl 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "servo-fontconfig 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "servo-freetype-sys 2.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "servo-glutin 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "x11 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] name = "shared_library" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1702,24 +1738,6 @@ version = "0.1.0" source = "git+https://github.com/huonw/simd#c4403387adb9a25188ff00ddc82582c2e1017030" [[package]] -name = "skia" -version = "0.0.20130412" -source = "git+https://github.com/servo/skia#a3102fc074612c9f44fb1b402fa1885bba25f233" -dependencies = [ - "cgl 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "egl 0.2.0 (git+https://github.com/servo/rust-egl)", - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "expat-sys 2.1.0 (git+https://github.com/servo/libexpat)", - "fontconfig 0.1.0 (git+https://github.com/servo/rust-fontconfig)", - "freetype-sys 2.4.11 (git+https://github.com/servo/libfreetype2)", - "gleam 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", - "glx 0.0.1 (git+https://github.com/servo/rust-glx)", - "io-surface 0.1.1 (git+https://github.com/servo/io-surface-rs)", - "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "x11 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] name = "smallvec" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1730,7 +1748,7 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "hpack 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1757,14 +1775,14 @@ dependencies = [ name = "style" version = "0.0.1" dependencies = [ - "app_units 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "app_units 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "cssparser 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "num 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", "plugins 0.0.1", @@ -1783,9 +1801,9 @@ dependencies = [ name = "style_tests" version = "0.0.1" dependencies = [ - "app_units 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "app_units 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "cssparser 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "plugins 0.0.1", "selectors 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1800,9 +1818,9 @@ name = "style_traits" version = "0.0.1" dependencies = [ "cssparser 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "num 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", "plugins 0.0.1", "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1933,20 +1951,20 @@ dependencies = [ name = "util" version = "0.0.1" dependencies = [ - "app_units 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "app_units 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "azure 0.2.0 (git+https://github.com/servo/rust-azure)", "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "cssparser 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", "html5ever 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.1.0 (git+https://github.com/servo/ipc-channel)", "js 0.1.1 (git+https://github.com/servo/rust-mozjs)", - "layers 0.1.0 (git+https://github.com/servo/rust-layers)", + "layers 0.2.0 (git+https://github.com/servo/rust-layers)", "lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "num 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", "plugins 0.0.1", @@ -1965,8 +1983,8 @@ dependencies = [ name = "util_tests" version = "0.0.1" dependencies = [ - "app_units 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "app_units 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "plugins 0.0.1", "util 0.0.1", @@ -2025,7 +2043,7 @@ version = "0.4.0" source = "git+https://github.com/jgraham/webdriver-rust.git#9dffcbe409af052788b75c25c368518aab30fd39" dependencies = [ "hyper 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "regex 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", "uuid 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2038,7 +2056,7 @@ dependencies = [ "hyper 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "image 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.1.0 (git+https://github.com/servo/ipc-channel)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "msg 0.0.1", "plugins 0.0.1", "regex 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2086,7 +2104,7 @@ dependencies = [ [[package]] name = "x11" -version = "2.1.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2104,7 +2122,7 @@ dependencies = [ [[package]] name = "xml-rs" -version = "0.1.26" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2115,7 +2133,7 @@ name = "xml5ever" version = "0.1.0" source = "git+https://github.com/Ygg01/xml5ever#9da3b1628bfcb69a48420f7aef69739d6706aa6a" dependencies = [ - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "mac 0.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "phf 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)", "phf_codegen 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/components/servo/Cargo.toml b/components/servo/Cargo.toml index 9a827973f7c..0bb661ef282 100644 --- a/components/servo/Cargo.toml +++ b/components/servo/Cargo.toml @@ -124,10 +124,6 @@ optional = true version = "0.3" features = ["release_max_level_info"] -[dependencies.euclid] -version = "0.3" -features = ["plugins"] - [dependencies.gaol] git = "https://github.com/pcwalton/gaol" @@ -150,4 +146,4 @@ time = "0.1.12" bitflags = "0.3" libc = "0.2" url = {version = "0.5", features = ["serde_serialization", "query_encoding"]} - +euclid = {version = "0.4", features = ["plugins"]} diff --git a/components/style/Cargo.toml b/components/style/Cargo.toml index b38295b8b18..a89e2a1e95d 100644 --- a/components/style/Cargo.toml +++ b/components/style/Cargo.toml @@ -32,7 +32,7 @@ lazy_static = "0.1.10" selectors = { version = "0.2", features = ["unstable"] } smallvec = "0.1" string_cache = "0.2" -euclid = {version = "0.3", features = ["plugins"]} +euclid = {version = "0.4", features = ["plugins"]} serde = "0.6" serde_macros = "0.6" url = "0.5" diff --git a/components/style/attr.rs b/components/style/attr.rs index 625eeee3a5c..0569b235a9c 100644 --- a/components/style/attr.rs +++ b/components/style/attr.rs @@ -6,7 +6,7 @@ use cssparser::RGBA; use std::ops::Deref; use string_cache::{Atom, Namespace}; use util::str::{DOMString, LengthOrPercentageOrAuto, parse_unsigned_integer, parse_legacy_color, parse_length}; -use util::str::{split_html_space_chars, str_join}; +use util::str::{split_html_space_chars, str_join, parse_integer}; use values::specified::{Length}; // Duplicated from script::dom::values. @@ -17,6 +17,7 @@ pub enum AttrValue { String(DOMString), TokenList(DOMString, Vec<Atom>), UInt(DOMString, u32), + Int(DOMString, i32), Atom(Atom), Length(DOMString, Option<Length>), Color(DOMString, Option<RGBA>), @@ -52,6 +53,22 @@ impl AttrValue { AttrValue::UInt(string, result) } + pub fn from_i32(string: DOMString, default: i32) -> AttrValue { + let result = parse_integer(string.chars()).unwrap_or(default); + AttrValue::Int(string, result) + } + + // https://html.spec.whatwg.org/multipage/#limited-to-only-non-negative-numbers + pub fn from_limited_i32(string: DOMString, default: i32) -> AttrValue { + let result = parse_integer(string.chars()).unwrap_or(default); + + if result < 0 { + AttrValue::Int(string, default) + } else { + AttrValue::Int(string, result) + } + } + // https://html.spec.whatwg.org/multipage/#limited-to-only-non-negative-numbers-greater-than-zero pub fn from_limited_u32(string: DOMString, default: u32) -> AttrValue { let result = parse_unsigned_integer(string.chars()).unwrap_or(default); @@ -165,6 +182,7 @@ impl Deref for AttrValue { AttrValue::UInt(ref value, _) | AttrValue::Length(ref value, _) | AttrValue::Color(ref value, _) | + AttrValue::Int(ref value, _) | AttrValue::Dimension(ref value, _) => &value, AttrValue::Atom(ref value) => &value, } diff --git a/components/style/font_face.rs b/components/style/font_face.rs index 52abb82c3cf..394eed1ebdd 100644 --- a/components/style/font_face.rs +++ b/components/style/font_face.rs @@ -40,7 +40,7 @@ pub fn parse_font_face_block(context: &ParserContext, input: &mut Parser) let pos = range.start; let message = format!("Unsupported @font-face descriptor declaration: '{}'", iter.input.slice(range)); - log_css_error(iter.input, pos, &*message); + log_css_error(iter.input, pos, &*message, context); } Ok(FontFaceDescriptorDeclaration::Family(value)) => { family = Some(value); diff --git a/components/style/parser.rs b/components/style/parser.rs index 8570bc777d1..40756638065 100644 --- a/components/style/parser.rs +++ b/components/style/parser.rs @@ -43,10 +43,6 @@ impl<'a> ParserContext<'a> { /// Defaults to a no-op. /// Set a `RUST_LOG=style::errors` environment variable /// to log CSS parse errors to stderr. -pub fn log_css_error(input: &mut Parser, position: SourcePosition, message: &str) { - if log_enabled!(log::LogLevel::Info) { - let location = input.source_location(position); - // TODO eventually this will got into a "web console" or something. - info!("{}:{} {}", location.line, location.column, message) - } +pub fn log_css_error(input: &mut Parser, position: SourcePosition, message: &str, parsercontext: &ParserContext) { + parsercontext.error_reporter.report_error(input, position, message); } diff --git a/components/style/properties.mako.rs b/components/style/properties.mako.rs index f1f4656f8e5..e6ec877904a 100644 --- a/components/style/properties.mako.rs +++ b/components/style/properties.mako.rs @@ -5739,7 +5739,7 @@ pub fn parse_property_declaration_list(context: &ParserContext, input: &mut Pars let pos = range.start; let message = format!("Unsupported property declaration: '{}'", iter.input.slice(range)); - log_css_error(iter.input, pos, &*message); + log_css_error(iter.input, pos, &*message, &context); } } } diff --git a/components/style/stylesheets.rs b/components/style/stylesheets.rs index e3af16929dc..cbf569f772e 100644 --- a/components/style/stylesheets.rs +++ b/components/style/stylesheets.rs @@ -108,7 +108,7 @@ impl Stylesheet { pub fn from_str(css: &str, base_url: Url, origin: Origin, error_reporter: Box<ParseErrorReporter + Send>) -> Stylesheet { let rule_parser = TopLevelRuleParser { - context: ParserContext::new(origin, &base_url, error_reporter), + context: ParserContext::new(origin, &base_url, error_reporter.clone()), state: Cell::new(State::Start), }; let mut input = Parser::new(css); @@ -131,7 +131,8 @@ impl Stylesheet { Err(range) => { let pos = range.start; let message = format!("Invalid rule: '{}'", iter.input.slice(range)); - log_css_error(iter.input, pos, &*message); + let context = ParserContext::new(origin, &base_url, error_reporter.clone()); + log_css_error(iter.input, pos, &*message, &context); } } } @@ -329,7 +330,7 @@ fn parse_nested_rules(context: &ParserContext, input: &mut Parser) -> Vec<CSSRul Err(range) => { let pos = range.start; let message = format!("Unsupported rule: '{}'", iter.input.slice(range)); - log_css_error(iter.input, pos, &*message); + log_css_error(iter.input, pos, &*message, &context); } } } diff --git a/components/style/viewport.rs b/components/style/viewport.rs index 698015686a1..ce67a24a561 100644 --- a/components/style/viewport.rs +++ b/components/style/viewport.rs @@ -271,7 +271,7 @@ impl ViewportRule { let pos = range.start; let message = format!("Unsupported @viewport descriptor declaration: '{}'", input.slice(range)); - log_css_error(input, pos, &*message); + log_css_error(input, pos, &*message, &context); } Ok(ViewportRule { declarations: valid_declarations.iter().cascade() }) diff --git a/components/style_traits/Cargo.toml b/components/style_traits/Cargo.toml index 118e785e96b..6c15fda31e1 100644 --- a/components/style_traits/Cargo.toml +++ b/components/style_traits/Cargo.toml @@ -15,7 +15,7 @@ path = "../plugins" [dependencies] cssparser = { version = "0.4", features = [ "serde-serialization" ] } -euclid = {version = "0.3", features = ["plugins"]} +euclid = {version = "0.4", features = ["plugins"]} log = "0.3" lazy_static = "0.1.10" num = "0.1.24" diff --git a/components/util/Cargo.toml b/components/util/Cargo.toml index 4a3d126cbf1..5d7b325080b 100644 --- a/components/util/Cargo.toml +++ b/components/util/Cargo.toml @@ -44,7 +44,7 @@ rustc-serialize = "0.3" smallvec = "0.1" num_cpus = "0.2.2" num = "0.1.24" -euclid = {version = "0.3", features = ["plugins"]} +euclid = {version = "0.4", features = ["plugins"]} selectors = "0.2" serde = "0.6" serde_macros = "0.6" diff --git a/components/util/geometry.rs b/components/util/geometry.rs index 7b5f89dc53e..d9599a11369 100644 --- a/components/util/geometry.rs +++ b/components/util/geometry.rs @@ -64,17 +64,6 @@ pub static ZERO_POINT: Point2D<Au> = Point2D { y: Au(0), }; -pub static ZERO_RECT: Rect<Au> = Rect { - origin: Point2D { - x: Au(0), - y: Au(0), - }, - size: Size2D { - width: Au(0), - height: Au(0), - } -}; - pub static MAX_RECT: Rect<Au> = Rect { origin: Point2D { x: Au(i32::MIN / 2), diff --git a/ports/cef/Cargo.lock b/ports/cef/Cargo.lock index c65101e5c03..c7c8b04fb0b 100644 --- a/ports/cef/Cargo.lock +++ b/ports/cef/Cargo.lock @@ -6,18 +6,18 @@ dependencies = [ "cgl 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "cocoa 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "compositing 0.0.1", - "core-foundation 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "core-graphics 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "core-graphics 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "core-text 0.1.0 (git+https://github.com/servo/core-text-rs)", "devtools 0.0.1", - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "gfx 0.0.1", - "gleam 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", + "gleam 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", "glutin_app 0.0.1", "js 0.1.1 (git+https://github.com/servo/rust-mozjs)", - "layers 0.1.0 (git+https://github.com/servo/rust-layers)", + "layers 0.2.0 (git+https://github.com/servo/rust-layers)", "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "msg 0.0.1", "net_traits 0.0.1", "objc 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -29,7 +29,7 @@ dependencies = [ "style 0.0.1", "url 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "util 0.0.1", - "x11 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "x11 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -64,10 +64,10 @@ dependencies = [ [[package]] name = "app_units" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -81,22 +81,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "azure" version = "0.2.0" -source = "git+https://github.com/servo/rust-azure#5a5701c269cb7cb65f6c690122ef75c268f8d44d" +source = "git+https://github.com/servo/rust-azure#a835f8578737034d48762b379f19a92bb2882cc0" dependencies = [ - "core-foundation 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "core-graphics 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "core-graphics 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "core-text 0.1.0 (git+https://github.com/servo/core-text-rs)", - "egl 0.2.0 (git+https://github.com/servo/rust-egl)", - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "freetype 0.1.0 (git+https://github.com/servo/rust-freetype)", - "freetype-sys 2.4.11 (git+https://github.com/servo/libfreetype2)", - "heapsize 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "heapsize 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize_plugin 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "skia 0.0.20130412 (git+https://github.com/servo/skia)", - "x11 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "servo-egl 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "servo-freetype-sys 2.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "servo-skia 0.20130412.2 (registry+https://github.com/rust-lang/crates.io-index)", + "x11 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -145,12 +145,12 @@ dependencies = [ "azure 0.2.0 (git+https://github.com/servo/rust-azure)", "canvas_traits 0.0.1", "cssparser 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "gfx_traits 0.0.1", - "gleam 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", + "gleam 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.1.0 (git+https://github.com/servo/ipc-channel)", - "layers 0.1.0 (git+https://github.com/servo/rust-layers)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "layers 0.2.0 (git+https://github.com/servo/rust-layers)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "num 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", "offscreen_gl_context 0.1.0 (git+https://github.com/ecoal95/rust-offscreen-rendering-context)", "plugins 0.0.1", @@ -163,10 +163,10 @@ version = "0.0.1" dependencies = [ "azure 0.2.0 (git+https://github.com/servo/rust-azure)", "cssparser 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "gfx_traits 0.0.1", "ipc-channel 0.1.0 (git+https://github.com/servo/ipc-channel)", - "layers 0.1.0 (git+https://github.com/servo/rust-layers)", + "layers 0.2.0 (git+https://github.com/servo/rust-layers)", "offscreen_gl_context 0.1.0 (git+https://github.com/ecoal95/rust-offscreen-rendering-context)", "plugins 0.0.1", "serde 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -193,21 +193,20 @@ name = "cgl" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "gleam 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", + "gleam 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "clipboard" -version = "0.0.3" -source = "git+https://github.com/aweinstock314/rust-clipboard#ef4cf77c9c736e0951df797ff4e1a7c945ce2e34" +version = "0.1.0" +source = "git+https://github.com/aweinstock314/rust-clipboard#4510d16e640fb52be1cd476557d52f69fa589196" dependencies = [ "clipboard-win 1.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "objc 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "objc-foundation 0.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "objc_id 0.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "x11 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "x11 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -235,7 +234,18 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "core-graphics 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "core-graphics 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "objc 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "cocoa" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "core-graphics 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "objc 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -249,25 +259,25 @@ source = "registry+https://github.com/rust-lang/crates.io-index" name = "compositing" version = "0.0.1" dependencies = [ - "app_units 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "app_units 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "azure 0.2.0 (git+https://github.com/servo/rust-azure)", "canvas 0.0.1", "canvas_traits 0.0.1", - "clipboard 0.0.3 (git+https://github.com/aweinstock314/rust-clipboard)", - "core-graphics 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "clipboard 0.1.0 (git+https://github.com/aweinstock314/rust-clipboard)", + "core-graphics 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "core-text 0.1.0 (git+https://github.com/servo/core-text-rs)", "devtools_traits 0.0.1", - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "gaol 0.0.1 (git+https://github.com/pcwalton/gaol)", "gfx 0.0.1", "gfx_traits 0.0.1", - "gleam 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", + "gleam 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", "image 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.1.0 (git+https://github.com/servo/ipc-channel)", - "layers 0.1.0 (git+https://github.com/servo/rust-layers)", + "layers 0.2.0 (git+https://github.com/servo/rust-layers)", "layout_traits 0.0.1", "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "msg 0.0.1", "net_traits 0.0.1", "num 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", @@ -296,7 +306,16 @@ dependencies = [ [[package]] name = "core-foundation" -version = "0.1.0" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "core-foundation-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "core-foundation-sys" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -304,10 +323,10 @@ dependencies = [ [[package]] name = "core-graphics" -version = "0.1.1" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "core-foundation 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -316,8 +335,8 @@ name = "core-text" version = "0.1.0" source = "git+https://github.com/servo/core-text-rs#d97cd4ae33509857f956e64c71f43cc71c98430f" dependencies = [ - "core-foundation 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "core-graphics 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "core-graphics 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -352,7 +371,7 @@ dependencies = [ "devtools_traits 0.0.1", "hyper 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.1.0 (git+https://github.com/servo/ipc-channel)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "msg 0.0.1", "plugins 0.0.1", "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", @@ -406,14 +425,6 @@ dependencies = [ ] [[package]] -name = "egl" -version = "0.2.0" -source = "git+https://github.com/servo/rust-egl#c59c59f6dc252e2ab17103b045d7ab1e452f32da" -dependencies = [ - "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] name = "encoding" version = "0.2.32" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -483,18 +494,18 @@ name = "env_logger" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "regex 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "euclid" -version = "0.3.2" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "heapsize 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "heapsize 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize_plugin 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "num 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", @@ -504,9 +515,10 @@ dependencies = [ [[package]] name = "expat-sys" -version = "2.1.0" -source = "git+https://github.com/servo/libexpat#b4fdb7a2c9825bdeafcd32ac43560e31ca839649" +version = "2.1.1-really.0" +source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ + "make-cmd 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -525,25 +537,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "fontconfig" -version = "0.1.0" -source = "git+https://github.com/servo/rust-fontconfig#5ad2ec0436036cd8151f7e03b637d89470daba91" -dependencies = [ - "fontconfig-sys 2.11.1 (git+https://github.com/servo/libfontconfig)", - "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "fontconfig-sys" -version = "2.11.1" -source = "git+https://github.com/servo/libfontconfig#3f93fab726d951a506fd318b359912b4bdcd2e35" -dependencies = [ - "expat-sys 2.1.0 (git+https://github.com/servo/libexpat)", - "freetype-sys 2.4.11 (git+https://github.com/servo/libfreetype2)", - "pkg-config 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] name = "freetype" version = "0.1.0" source = "git+https://github.com/servo/rust-freetype#d564ff90a3c69d987f5c015d7ec034cfaee21aff" @@ -552,14 +545,6 @@ dependencies = [ ] [[package]] -name = "freetype-sys" -version = "2.4.11" -source = "git+https://github.com/servo/libfreetype2#237f95bae7536bae7fcfbbc65dba7285f422b90f" -dependencies = [ - "pkg-config 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] name = "futf" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -574,7 +559,7 @@ version = "0.0.1" source = "git+https://github.com/pcwalton/gaol#71865ff8a1824cbc1cbee4d388d56c5ba1b5ffc2" dependencies = [ "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -604,24 +589,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index" name = "gfx" version = "0.0.1" dependencies = [ - "app_units 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "app_units 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "azure 0.2.0 (git+https://github.com/servo/rust-azure)", "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "canvas_traits 0.0.1", - "core-foundation 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "core-graphics 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "core-graphics 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "core-text 0.1.0 (git+https://github.com/servo/core-text-rs)", - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "fontconfig 0.1.0 (git+https://github.com/servo/rust-fontconfig)", "freetype 0.1.0 (git+https://github.com/servo/rust-freetype)", "gfx_traits 0.0.1", "harfbuzz-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.1.0 (git+https://github.com/servo/ipc-channel)", - "layers 0.1.0 (git+https://github.com/servo/rust-layers)", + "layers 0.2.0 (git+https://github.com/servo/rust-layers)", "lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "msg 0.0.1", "net_traits 0.0.1", "plugins 0.0.1", @@ -631,8 +615,9 @@ dependencies = [ "script_traits 0.0.1", "serde 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "servo-fontconfig 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "servo-skia 0.20130412.2 (registry+https://github.com/rust-lang/crates.io-index)", "simd 0.1.0 (git+https://github.com/huonw/simd)", - "skia 0.0.20130412 (git+https://github.com/servo/skia)", "smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "style 0.0.1", @@ -668,22 +653,21 @@ dependencies = [ [[package]] name = "gl_generator" -version = "0.2.0" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "khronos_api 0.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "xml-rs 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", + "khronos_api 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "xml-rs 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "gleam" -version = "0.1.19" +version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "gl_generator 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "khronos_api 0.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "gl_generator 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "khronos_api 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -692,66 +676,34 @@ version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "glutin" -version = "0.4.2" -source = "git+https://github.com/servo/glutin?branch=servo#f04bc869a37752d3d4a4258660428a360588e3a7" -dependencies = [ - "android_glue 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "cgl 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cocoa 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "core-foundation 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "core-graphics 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "dwmapi-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "gdi32-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "gl_common 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "gl_generator 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "kernel32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "khronos_api 0.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "objc 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "osmesa-sys 0.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "shared_library 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "shell32-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "user32-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "wayland-client 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "wayland-kbd 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "wayland-window 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", - "x11 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "x11-dl 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] name = "glutin_app" version = "0.0.1" dependencies = [ "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "cgl 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "compositing 0.0.1", - "egl 0.2.0 (git+https://github.com/servo/rust-egl)", - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "gleam 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", - "glutin 0.4.2 (git+https://github.com/servo/glutin?branch=servo)", - "layers 0.1.0 (git+https://github.com/servo/rust-layers)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "gleam 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", + "layers 0.2.0 (git+https://github.com/servo/rust-layers)", "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "msg 0.0.1", "net_traits 0.0.1", "script_traits 0.0.1", + "servo-egl 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "servo-glutin 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", "url 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "util 0.0.1", - "x11 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "x11 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "glx" -version = "0.0.1" -source = "git+https://github.com/servo/rust-glx#75ed2359f50c16c60f871e2f5f146e2016d8453d" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "gl_common 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "gl_generator 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "khronos_api 0.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "gl_generator 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "khronos_api 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -793,10 +745,10 @@ dependencies = [ [[package]] name = "heapsize" -version = "0.1.2" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -809,7 +761,7 @@ name = "hpack" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -817,7 +769,7 @@ name = "html5ever" version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "mac 0.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "phf 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)", "phf_codegen 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -841,7 +793,7 @@ dependencies = [ "cookie 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "httparse 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "language-tags 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "mime 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", "openssl 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -876,12 +828,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "io-surface" version = "0.1.1" -source = "git+https://github.com/servo/io-surface-rs#aaaa5da1f2d75958fc1a3a06648717be4ea08283" +source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cgl 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "core-foundation 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "gleam 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "gleam 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -903,11 +855,11 @@ dependencies = [ [[package]] name = "js" version = "0.1.1" -source = "git+https://github.com/servo/rust-mozjs#d712414c8b1cab4672d88ec0f4861c9768ea27d7" +source = "git+https://github.com/servo/rust-mozjs#6bfe259e0adc51ceabeb95d3af87d9041d16a767" dependencies = [ - "heapsize 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "heapsize 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "mozjs_sys 0.0.0 (git+https://github.com/servo/mozjs)", "num 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", @@ -924,7 +876,7 @@ dependencies = [ [[package]] name = "khronos_api" -version = "0.0.8" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -934,29 +886,29 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "layers" -version = "0.1.0" -source = "git+https://github.com/servo/rust-layers#82672814604f5e4293fcc9d2f89055a85ad87c11" +version = "0.2.0" +source = "git+https://github.com/servo/rust-layers#c4efb24deb170908a534ae916d23890f85725b17" dependencies = [ "azure 0.2.0 (git+https://github.com/servo/rust-azure)", "cgl 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "core-foundation 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "egl 0.2.0 (git+https://github.com/servo/rust-egl)", - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "gleam 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", - "glx 0.0.1 (git+https://github.com/servo/rust-glx)", - "io-surface 0.1.1 (git+https://github.com/servo/io-surface-rs)", + "core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "gleam 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", + "glx 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "io-surface 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", - "skia 0.0.20130412 (git+https://github.com/servo/skia)", - "x11 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "servo-egl 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "servo-skia 0.20130412.2 (registry+https://github.com/rust-lang/crates.io-index)", + "x11 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "layout" version = "0.0.1" dependencies = [ - "app_units 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "app_units 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "azure 0.2.0 (git+https://github.com/servo/rust-azure)", "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "canvas 0.0.1", @@ -964,14 +916,14 @@ dependencies = [ "clock_ticks 0.1.0 (git+https://github.com/tomaka/clock_ticks)", "cssparser 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "gfx 0.0.1", "gfx_traits 0.0.1", "ipc-channel 0.1.0 (git+https://github.com/servo/ipc-channel)", "layout_traits 0.0.1", "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "msg 0.0.1", "net_traits 0.0.1", "plugins 0.0.1", @@ -997,7 +949,7 @@ dependencies = [ name = "layout_traits" version = "0.0.1" dependencies = [ - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "gfx 0.0.1", "ipc-channel 0.1.0 (git+https://github.com/servo/ipc-channel)", "msg 0.0.1", @@ -1045,10 +997,10 @@ dependencies = [ [[package]] name = "log" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1062,6 +1014,11 @@ version = "0.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] +name = "make-cmd" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] name = "malloc_buf" version = "0.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1087,7 +1044,7 @@ name = "mime" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1129,16 +1086,16 @@ dependencies = [ name = "msg" version = "0.0.1" dependencies = [ - "app_units 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "app_units 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "azure 0.2.0 (git+https://github.com/servo/rust-azure)", "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "canvas_traits 0.0.1", - "core-foundation 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "io-surface 0.1.1 (git+https://github.com/servo/io-surface-rs)", + "io-surface 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.1.0 (git+https://github.com/servo/ipc-channel)", - "layers 0.1.0 (git+https://github.com/servo/rust-layers)", + "layers 0.2.0 (git+https://github.com/servo/rust-layers)", "offscreen_gl_context 0.1.0 (git+https://github.com/ecoal95/rust-offscreen-rendering-context)", "plugins 0.0.1", "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1156,11 +1113,11 @@ dependencies = [ "brotli 0.3.17 (git+https://github.com/ende76/brotli-rs)", "cookie 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "devtools_traits 0.0.1", - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "flate2 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.1.0 (git+https://github.com/servo/ipc-channel)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "mime_guess 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "msg 0.0.1", "net_traits 0.0.1", @@ -1189,11 +1146,11 @@ dependencies = [ name = "net_traits" version = "0.0.1" dependencies = [ - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "image 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.1.0 (git+https://github.com/servo/ipc-channel)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "msg 0.0.1", "plugins 0.0.1", "serde 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1251,21 +1208,20 @@ dependencies = [ [[package]] name = "offscreen_gl_context" version = "0.1.0" -source = "git+https://github.com/ecoal95/rust-offscreen-rendering-context#922819338946a3fa26a8ae49dc34cc1ede8b3705" +source = "git+https://github.com/ecoal95/rust-offscreen-rendering-context#483abed6709570cb0930e6427455cd453363ffcd" dependencies = [ "cgl 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "core-foundation 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "gl_generator 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "gleam 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", - "glutin 0.4.2 (git+https://github.com/servo/glutin?branch=servo)", - "khronos_api 0.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "layers 0.1.0 (git+https://github.com/servo/rust-layers)", - "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "gl_generator 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "gleam 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", + "khronos_api 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "layers 0.2.0 (git+https://github.com/servo/rust-layers)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "x11 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "servo-glutin 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "x11 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1382,7 +1338,7 @@ dependencies = [ "hbs-pow 0.1.0 (git+https://github.com/libheartbeats/heartbeats-simple-rust.git)", "ipc-channel 0.1.0 (git+https://github.com/servo/ipc-channel)", "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "plugins 0.0.1", "profile_traits 0.0.1", "regex 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1448,6 +1404,11 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] +name = "ref_slice" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] name = "regex" version = "0.1.41" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1472,7 +1433,7 @@ name = "script" version = "0.0.1" dependencies = [ "angle 0.1.0 (git+https://github.com/ecoal95/angle?branch=servo)", - "app_units 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "app_units 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "canvas 0.0.1", "canvas_traits 0.0.1", @@ -1480,7 +1441,7 @@ dependencies = [ "cssparser 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "devtools_traits 0.0.1", "encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "html5ever 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1488,7 +1449,7 @@ dependencies = [ "ipc-channel 0.1.0 (git+https://github.com/servo/ipc-channel)", "js 0.1.1 (git+https://github.com/servo/rust-mozjs)", "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "msg 0.0.1", "net_traits 0.0.1", "num 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1496,6 +1457,7 @@ dependencies = [ "plugins 0.0.1", "profile_traits 0.0.1", "rand 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)", + "ref_slice 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", "script_traits 0.0.1", "selectors 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1518,9 +1480,9 @@ dependencies = [ name = "script_traits" version = "0.0.1" dependencies = [ - "app_units 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "app_units 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "devtools_traits 0.0.1", - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.1.0 (git+https://github.com/servo/ipc-channel)", "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "msg 0.0.1", @@ -1594,16 +1556,16 @@ dependencies = [ "devtools 0.0.1", "devtools_traits 0.0.1", "env_logger 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "gaol 0.0.1 (git+https://github.com/pcwalton/gaol)", "gfx 0.0.1", - "gleam 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", + "gleam 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", "glutin_app 0.0.1", "ipc-channel 0.1.0 (git+https://github.com/servo/ipc-channel)", - "layers 0.1.0 (git+https://github.com/servo/rust-layers)", + "layers 0.2.0 (git+https://github.com/servo/rust-layers)", "layout 0.0.1", "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "msg 0.0.1", "net 0.0.1", "net_traits 0.0.1", @@ -1620,6 +1582,91 @@ dependencies = [ ] [[package]] +name = "servo-egl" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "servo-fontconfig" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "servo-fontconfig-sys 2.11.2-really.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "servo-fontconfig-sys" +version = "2.11.2-really.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "expat-sys 2.1.1-really.0 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "servo-freetype-sys 2.4.11 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "servo-freetype-sys" +version = "2.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "pkg-config 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "servo-glutin" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "android_glue 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "cgl 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cocoa 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "core-graphics 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "dwmapi-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "gdi32-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "gl_common 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "gl_generator 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "kernel32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "khronos_api 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "objc 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "osmesa-sys 0.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "shared_library 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "shell32-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "user32-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "wayland-client 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "wayland-kbd 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "wayland-window 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "x11 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "x11-dl 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "servo-skia" +version = "0.20130412.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cgl 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "expat-sys 2.1.1-really.0 (registry+https://github.com/rust-lang/crates.io-index)", + "gleam 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", + "glx 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "io-surface 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "servo-egl 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "servo-fontconfig 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "servo-freetype-sys 2.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "servo-glutin 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "x11 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] name = "shared_library" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1643,24 +1690,6 @@ version = "0.1.0" source = "git+https://github.com/huonw/simd#c4403387adb9a25188ff00ddc82582c2e1017030" [[package]] -name = "skia" -version = "0.0.20130412" -source = "git+https://github.com/servo/skia#a3102fc074612c9f44fb1b402fa1885bba25f233" -dependencies = [ - "cgl 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "egl 0.2.0 (git+https://github.com/servo/rust-egl)", - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "expat-sys 2.1.0 (git+https://github.com/servo/libexpat)", - "fontconfig 0.1.0 (git+https://github.com/servo/rust-fontconfig)", - "freetype-sys 2.4.11 (git+https://github.com/servo/libfreetype2)", - "gleam 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", - "glx 0.0.1 (git+https://github.com/servo/rust-glx)", - "io-surface 0.1.1 (git+https://github.com/servo/io-surface-rs)", - "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "x11 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] name = "smallvec" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1671,7 +1700,7 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "hpack 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1698,14 +1727,14 @@ dependencies = [ name = "style" version = "0.0.1" dependencies = [ - "app_units 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "app_units 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "cssparser 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "num 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", "plugins 0.0.1", @@ -1725,9 +1754,9 @@ name = "style_traits" version = "0.0.1" dependencies = [ "cssparser 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "num 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", "plugins 0.0.1", "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1858,20 +1887,20 @@ dependencies = [ name = "util" version = "0.0.1" dependencies = [ - "app_units 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "app_units 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "azure 0.2.0 (git+https://github.com/servo/rust-azure)", "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "cssparser 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", "html5ever 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.1.0 (git+https://github.com/servo/ipc-channel)", "js 0.1.1 (git+https://github.com/servo/rust-mozjs)", - "layers 0.1.0 (git+https://github.com/servo/rust-layers)", + "layers 0.2.0 (git+https://github.com/servo/rust-layers)", "lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "num 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", "plugins 0.0.1", @@ -1939,7 +1968,7 @@ version = "0.4.0" source = "git+https://github.com/jgraham/webdriver-rust.git#9dffcbe409af052788b75c25c368518aab30fd39" dependencies = [ "hyper 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "regex 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", "uuid 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1952,7 +1981,7 @@ dependencies = [ "hyper 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "image 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.1.0 (git+https://github.com/servo/ipc-channel)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "msg 0.0.1", "plugins 0.0.1", "regex 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2000,7 +2029,7 @@ dependencies = [ [[package]] name = "x11" -version = "2.1.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2018,7 +2047,7 @@ dependencies = [ [[package]] name = "xml-rs" -version = "0.1.26" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2029,7 +2058,7 @@ name = "xml5ever" version = "0.1.0" source = "git+https://github.com/Ygg01/xml5ever#9da3b1628bfcb69a48420f7aef69739d6706aa6a" dependencies = [ - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "mac 0.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "phf 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)", "phf_codegen 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/ports/cef/Cargo.toml b/ports/cef/Cargo.toml index e19bb309a9c..762dfeb4845 100644 --- a/ports/cef/Cargo.toml +++ b/ports/cef/Cargo.toml @@ -9,10 +9,10 @@ path = "lib.rs" crate-type = ["dylib"] [dependencies] -log = "*" -url = "*" +log = "0.3" +url = "0.5" libc = "0.2" -euclid = {version = "0.3", features = ["plugins"]} +euclid = {version = "0.4", features = ["plugins"]} gleam = "0.1" [dependencies.servo] @@ -68,15 +68,15 @@ git = "https://github.com/servo/rust-stb-image" [target.x86_64-apple-darwin.dependencies] objc = "0.1" cocoa = "0.1" -core-foundation = "0.1" -core-graphics = "0.1" +core-foundation = "0.2" +core-graphics = "0.2" cgl = "0.1" [target.x86_64-apple-darwin.dependencies.core-text] git = "https://github.com/servo/core-text-rs" [target.i686-unknown-linux-gnu.dependencies] -x11 = "*" +x11 = "2.3" [target.x86_64-unknown-linux-gnu.dependencies] -x11 = "*" +x11 = "2.3" diff --git a/ports/cef/window.rs b/ports/cef/window.rs index 60d6c460567..ced1b80192b 100644 --- a/ports/cef/window.rs +++ b/ports/cef/window.rs @@ -26,11 +26,11 @@ use euclid::size::{Size2D, TypedSize2D}; use gleam::gl; use layers::geometry::DevicePixel; use layers::platform::surface::NativeDisplay; -use libc::{c_char, c_void}; use msg::constellation_msg::{Key, KeyModifiers}; use net_traits::net_error_list::NetError; use std::cell::RefCell; use std::ffi::CString; +use std::os::raw::{c_char, c_void}; use std::ptr; use std::rc::Rc; use std::sync::mpsc::{Sender, channel}; diff --git a/ports/glutin/Cargo.toml b/ports/glutin/Cargo.toml index 5dde75ce9b5..4f50c6d21db 100644 --- a/ports/glutin/Cargo.toml +++ b/ports/glutin/Cargo.toml @@ -9,7 +9,7 @@ path = "lib.rs" [features] window = [] -headless = ["glutin/headless"] +headless = ["servo-glutin/headless"] [dependencies] time = "0.1.12" @@ -17,7 +17,8 @@ bitflags = "0.3" libc = "0.2" url = "0.5" gleam = "0.1" -euclid = {version = "0.3", features = ["plugins"]} +euclid = {version = "0.4", features = ["plugins"]} +servo-glutin = "0.4" [dependencies.compositing] path = "../../components/compositing" @@ -38,10 +39,6 @@ path = "../../components/net_traits" [dependencies.util] path = "../../components/util" -[dependencies.glutin] -git = "https://github.com/servo/glutin" -branch = "servo" - [target.i686-unknown-linux-gnu.dependencies] x11 = "2.0.0" @@ -57,5 +54,5 @@ x11 = "2.0.0" [target.x86_64-apple-darwin.dependencies] cgl = "0.1" -[target.arm-linux-androideabi.dependencies.egl] -git = "https://github.com/servo/rust-egl" +[target.arm-linux-androideabi.dependencies] +servo-egl = "0.2" diff --git a/ports/glutin/window.rs b/ports/glutin/window.rs index 0eac8830e2d..c8e9fa45082 100644 --- a/ports/glutin/window.rs +++ b/ports/glutin/window.rs @@ -18,13 +18,13 @@ use glutin; use glutin::{Api, ElementState, Event, GlRequest, MouseButton, VirtualKeyCode, MouseScrollDelta}; use layers::geometry::DevicePixel; use layers::platform::surface::NativeDisplay; -use libc::c_void; #[cfg(feature = "window")] use msg::constellation_msg::{KeyState, NONE, CONTROL, SHIFT, ALT, SUPER}; use msg::constellation_msg::{self, Key}; use net_traits::net_error_list::NetError; #[cfg(feature = "window")] use std::cell::{Cell, RefCell}; +use std::os::raw::c_void; #[cfg(all(feature = "headless", target_os = "linux"))] use std::ptr; use std::rc::Rc; diff --git a/ports/gonk/Cargo.lock b/ports/gonk/Cargo.lock index 1ec5f617f1a..b91b08d8bd9 100644 --- a/ports/gonk/Cargo.lock +++ b/ports/gonk/Cargo.lock @@ -7,10 +7,10 @@ dependencies = [ "egl 0.2.0 (git+https://github.com/servo/rust-egl)", "env_logger 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "errno 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "gfx 0.0.1", - "gleam 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", - "layers 0.1.0 (git+https://github.com/servo/rust-layers)", + "gleam 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", + "layers 0.2.0 (git+https://github.com/servo/rust-layers)", "layout 0.0.1", "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "msg 0.0.1", @@ -55,10 +55,10 @@ dependencies = [ [[package]] name = "app_units" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -72,22 +72,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "azure" version = "0.2.0" -source = "git+https://github.com/servo/rust-azure#5a5701c269cb7cb65f6c690122ef75c268f8d44d" +source = "git+https://github.com/servo/rust-azure#a835f8578737034d48762b379f19a92bb2882cc0" dependencies = [ - "core-foundation 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "core-graphics 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "core-graphics 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "core-text 0.1.0 (git+https://github.com/servo/core-text-rs)", - "egl 0.2.0 (git+https://github.com/servo/rust-egl)", - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "freetype 0.1.0 (git+https://github.com/servo/rust-freetype)", - "freetype-sys 2.4.11 (git+https://github.com/servo/libfreetype2)", - "heapsize 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "heapsize 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize_plugin 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "skia 0.0.20130412 (git+https://github.com/servo/skia)", - "x11 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "servo-egl 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "servo-freetype-sys 2.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "servo-skia 0.20130412.2 (registry+https://github.com/rust-lang/crates.io-index)", + "x11 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -136,12 +136,12 @@ dependencies = [ "azure 0.2.0 (git+https://github.com/servo/rust-azure)", "canvas_traits 0.0.1", "cssparser 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "gfx_traits 0.0.1", - "gleam 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", + "gleam 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.1.0 (git+https://github.com/servo/ipc-channel)", - "layers 0.1.0 (git+https://github.com/servo/rust-layers)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "layers 0.2.0 (git+https://github.com/servo/rust-layers)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "num 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", "offscreen_gl_context 0.1.0 (git+https://github.com/ecoal95/rust-offscreen-rendering-context)", "plugins 0.0.1", @@ -154,10 +154,10 @@ version = "0.0.1" dependencies = [ "azure 0.2.0 (git+https://github.com/servo/rust-azure)", "cssparser 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "gfx_traits 0.0.1", "ipc-channel 0.1.0 (git+https://github.com/servo/ipc-channel)", - "layers 0.1.0 (git+https://github.com/servo/rust-layers)", + "layers 0.2.0 (git+https://github.com/servo/rust-layers)", "offscreen_gl_context 0.1.0 (git+https://github.com/ecoal95/rust-offscreen-rendering-context)", "plugins 0.0.1", "serde 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -184,21 +184,20 @@ name = "cgl" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "gleam 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", + "gleam 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "clipboard" -version = "0.0.3" -source = "git+https://github.com/aweinstock314/rust-clipboard#ef4cf77c9c736e0951df797ff4e1a7c945ce2e34" +version = "0.1.0" +source = "git+https://github.com/aweinstock314/rust-clipboard#4510d16e640fb52be1cd476557d52f69fa589196" dependencies = [ "clipboard-win 1.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "objc 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "objc-foundation 0.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "objc_id 0.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "x11 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "x11 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -222,11 +221,11 @@ dependencies = [ [[package]] name = "cocoa" -version = "0.1.5" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "core-graphics 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "core-graphics 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "objc 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -240,25 +239,25 @@ source = "registry+https://github.com/rust-lang/crates.io-index" name = "compositing" version = "0.0.1" dependencies = [ - "app_units 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "app_units 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "azure 0.2.0 (git+https://github.com/servo/rust-azure)", "canvas 0.0.1", "canvas_traits 0.0.1", - "clipboard 0.0.3 (git+https://github.com/aweinstock314/rust-clipboard)", - "core-graphics 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "clipboard 0.1.0 (git+https://github.com/aweinstock314/rust-clipboard)", + "core-graphics 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "core-text 0.1.0 (git+https://github.com/servo/core-text-rs)", "devtools_traits 0.0.1", - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "gaol 0.0.1 (git+https://github.com/pcwalton/gaol)", "gfx 0.0.1", "gfx_traits 0.0.1", - "gleam 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", + "gleam 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", "image 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.1.0 (git+https://github.com/servo/ipc-channel)", - "layers 0.1.0 (git+https://github.com/servo/rust-layers)", + "layers 0.2.0 (git+https://github.com/servo/rust-layers)", "layout_traits 0.0.1", "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "msg 0.0.1", "net_traits 0.0.1", "num 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", @@ -287,7 +286,16 @@ dependencies = [ [[package]] name = "core-foundation" -version = "0.1.0" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "core-foundation-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "core-foundation-sys" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -295,10 +303,10 @@ dependencies = [ [[package]] name = "core-graphics" -version = "0.1.1" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "core-foundation 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -307,8 +315,8 @@ name = "core-text" version = "0.1.0" source = "git+https://github.com/servo/core-text-rs#d97cd4ae33509857f956e64c71f43cc71c98430f" dependencies = [ - "core-foundation 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "core-graphics 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "core-graphics 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -343,7 +351,7 @@ dependencies = [ "devtools_traits 0.0.1", "hyper 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.1.0 (git+https://github.com/servo/ipc-channel)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "msg 0.0.1", "plugins 0.0.1", "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", @@ -474,7 +482,7 @@ name = "env_logger" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "regex 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -490,12 +498,12 @@ dependencies = [ [[package]] name = "euclid" -version = "0.3.2" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "heapsize 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "heapsize 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize_plugin 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "num 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", @@ -505,9 +513,10 @@ dependencies = [ [[package]] name = "expat-sys" -version = "2.1.0" -source = "git+https://github.com/servo/libexpat#b4fdb7a2c9825bdeafcd32ac43560e31ca839649" +version = "2.1.1-really.0" +source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ + "make-cmd 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -526,25 +535,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "fontconfig" -version = "0.1.0" -source = "git+https://github.com/servo/rust-fontconfig#5ad2ec0436036cd8151f7e03b637d89470daba91" -dependencies = [ - "fontconfig-sys 2.11.1 (git+https://github.com/servo/libfontconfig)", - "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "fontconfig-sys" -version = "2.11.1" -source = "git+https://github.com/servo/libfontconfig#3f93fab726d951a506fd318b359912b4bdcd2e35" -dependencies = [ - "expat-sys 2.1.0 (git+https://github.com/servo/libexpat)", - "freetype-sys 2.4.11 (git+https://github.com/servo/libfreetype2)", - "pkg-config 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] name = "freetype" version = "0.1.0" source = "git+https://github.com/servo/rust-freetype#d564ff90a3c69d987f5c015d7ec034cfaee21aff" @@ -553,14 +543,6 @@ dependencies = [ ] [[package]] -name = "freetype-sys" -version = "2.4.11" -source = "git+https://github.com/servo/libfreetype2#237f95bae7536bae7fcfbbc65dba7285f422b90f" -dependencies = [ - "pkg-config 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] name = "futf" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -575,7 +557,7 @@ version = "0.0.1" source = "git+https://github.com/pcwalton/gaol#71865ff8a1824cbc1cbee4d388d56c5ba1b5ffc2" dependencies = [ "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -605,24 +587,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index" name = "gfx" version = "0.0.1" dependencies = [ - "app_units 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "app_units 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "azure 0.2.0 (git+https://github.com/servo/rust-azure)", "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "canvas_traits 0.0.1", - "core-foundation 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "core-graphics 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "core-graphics 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "core-text 0.1.0 (git+https://github.com/servo/core-text-rs)", - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "fontconfig 0.1.0 (git+https://github.com/servo/rust-fontconfig)", "freetype 0.1.0 (git+https://github.com/servo/rust-freetype)", "gfx_traits 0.0.1", "harfbuzz-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.1.0 (git+https://github.com/servo/ipc-channel)", - "layers 0.1.0 (git+https://github.com/servo/rust-layers)", + "layers 0.2.0 (git+https://github.com/servo/rust-layers)", "lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "msg 0.0.1", "net_traits 0.0.1", "plugins 0.0.1", @@ -632,8 +613,9 @@ dependencies = [ "script_traits 0.0.1", "serde 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "servo-fontconfig 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "servo-skia 0.20130412.2 (registry+https://github.com/rust-lang/crates.io-index)", "simd 0.1.0 (git+https://github.com/huonw/simd)", - "skia 0.0.20130412 (git+https://github.com/servo/skia)", "smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "style 0.0.1", @@ -669,22 +651,21 @@ dependencies = [ [[package]] name = "gl_generator" -version = "0.2.0" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "khronos_api 0.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "xml-rs 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", + "khronos_api 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "xml-rs 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "gleam" -version = "0.1.19" +version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "gl_generator 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "khronos_api 0.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "gl_generator 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "khronos_api 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -693,44 +674,12 @@ version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "glutin" -version = "0.4.2" -source = "git+https://github.com/servo/glutin?branch=servo#f04bc869a37752d3d4a4258660428a360588e3a7" -dependencies = [ - "android_glue 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "cgl 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cocoa 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "core-foundation 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "core-graphics 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "dwmapi-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "gdi32-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "gl_common 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "gl_generator 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "kernel32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "khronos_api 0.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "objc 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "osmesa-sys 0.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "shared_library 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "shell32-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "user32-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "wayland-client 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "wayland-kbd 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "wayland-window 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", - "x11 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "x11-dl 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] name = "glx" -version = "0.0.1" -source = "git+https://github.com/servo/rust-glx#75ed2359f50c16c60f871e2f5f146e2016d8453d" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "gl_common 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "gl_generator 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "khronos_api 0.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "gl_generator 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "khronos_api 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -772,10 +721,10 @@ dependencies = [ [[package]] name = "heapsize" -version = "0.1.2" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -788,7 +737,7 @@ name = "hpack" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -796,7 +745,7 @@ name = "html5ever" version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "mac 0.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "phf 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)", "phf_codegen 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -820,7 +769,7 @@ dependencies = [ "cookie 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "httparse 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "language-tags 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "mime 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", "openssl 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -855,12 +804,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "io-surface" version = "0.1.1" -source = "git+https://github.com/servo/io-surface-rs#aaaa5da1f2d75958fc1a3a06648717be4ea08283" +source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cgl 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "core-foundation 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "gleam 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "gleam 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -882,11 +831,11 @@ dependencies = [ [[package]] name = "js" version = "0.1.1" -source = "git+https://github.com/servo/rust-mozjs#d712414c8b1cab4672d88ec0f4861c9768ea27d7" +source = "git+https://github.com/servo/rust-mozjs#6bfe259e0adc51ceabeb95d3af87d9041d16a767" dependencies = [ - "heapsize 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "heapsize 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "mozjs_sys 0.0.0 (git+https://github.com/servo/mozjs)", "num 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", @@ -903,7 +852,7 @@ dependencies = [ [[package]] name = "khronos_api" -version = "0.0.8" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -913,29 +862,29 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "layers" -version = "0.1.0" -source = "git+https://github.com/servo/rust-layers#82672814604f5e4293fcc9d2f89055a85ad87c11" +version = "0.2.0" +source = "git+https://github.com/servo/rust-layers#c4efb24deb170908a534ae916d23890f85725b17" dependencies = [ "azure 0.2.0 (git+https://github.com/servo/rust-azure)", "cgl 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "core-foundation 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "egl 0.2.0 (git+https://github.com/servo/rust-egl)", - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "gleam 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", - "glx 0.0.1 (git+https://github.com/servo/rust-glx)", - "io-surface 0.1.1 (git+https://github.com/servo/io-surface-rs)", + "core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "gleam 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", + "glx 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "io-surface 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", - "skia 0.0.20130412 (git+https://github.com/servo/skia)", - "x11 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "servo-egl 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "servo-skia 0.20130412.2 (registry+https://github.com/rust-lang/crates.io-index)", + "x11 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "layout" version = "0.0.1" dependencies = [ - "app_units 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "app_units 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "azure 0.2.0 (git+https://github.com/servo/rust-azure)", "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "canvas 0.0.1", @@ -943,14 +892,14 @@ dependencies = [ "clock_ticks 0.1.0 (git+https://github.com/tomaka/clock_ticks)", "cssparser 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "gfx 0.0.1", "gfx_traits 0.0.1", "ipc-channel 0.1.0 (git+https://github.com/servo/ipc-channel)", "layout_traits 0.0.1", "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "msg 0.0.1", "net_traits 0.0.1", "plugins 0.0.1", @@ -976,7 +925,7 @@ dependencies = [ name = "layout_traits" version = "0.0.1" dependencies = [ - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "gfx 0.0.1", "ipc-channel 0.1.0 (git+https://github.com/servo/ipc-channel)", "msg 0.0.1", @@ -1024,10 +973,10 @@ dependencies = [ [[package]] name = "log" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1041,6 +990,11 @@ version = "0.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] +name = "make-cmd" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] name = "malloc_buf" version = "0.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1066,7 +1020,7 @@ name = "mime" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1108,16 +1062,16 @@ dependencies = [ name = "msg" version = "0.0.1" dependencies = [ - "app_units 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "app_units 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "azure 0.2.0 (git+https://github.com/servo/rust-azure)", "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "canvas_traits 0.0.1", - "core-foundation 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "io-surface 0.1.1 (git+https://github.com/servo/io-surface-rs)", + "io-surface 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.1.0 (git+https://github.com/servo/ipc-channel)", - "layers 0.1.0 (git+https://github.com/servo/rust-layers)", + "layers 0.2.0 (git+https://github.com/servo/rust-layers)", "offscreen_gl_context 0.1.0 (git+https://github.com/ecoal95/rust-offscreen-rendering-context)", "plugins 0.0.1", "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1135,11 +1089,11 @@ dependencies = [ "brotli 0.3.17 (git+https://github.com/ende76/brotli-rs)", "cookie 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "devtools_traits 0.0.1", - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "flate2 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.1.0 (git+https://github.com/servo/ipc-channel)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "mime_guess 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "msg 0.0.1", "net_traits 0.0.1", @@ -1168,11 +1122,11 @@ dependencies = [ name = "net_traits" version = "0.0.1" dependencies = [ - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "image 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.1.0 (git+https://github.com/servo/ipc-channel)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "msg 0.0.1", "plugins 0.0.1", "serde 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1230,21 +1184,20 @@ dependencies = [ [[package]] name = "offscreen_gl_context" version = "0.1.0" -source = "git+https://github.com/ecoal95/rust-offscreen-rendering-context#922819338946a3fa26a8ae49dc34cc1ede8b3705" +source = "git+https://github.com/ecoal95/rust-offscreen-rendering-context#483abed6709570cb0930e6427455cd453363ffcd" dependencies = [ "cgl 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "core-foundation 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "gl_generator 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "gleam 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", - "glutin 0.4.2 (git+https://github.com/servo/glutin?branch=servo)", - "khronos_api 0.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "layers 0.1.0 (git+https://github.com/servo/rust-layers)", - "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "gl_generator 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "gleam 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", + "khronos_api 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "layers 0.2.0 (git+https://github.com/servo/rust-layers)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "x11 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "servo-glutin 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "x11 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1361,7 +1314,7 @@ dependencies = [ "hbs-pow 0.1.0 (git+https://github.com/libheartbeats/heartbeats-simple-rust.git)", "ipc-channel 0.1.0 (git+https://github.com/servo/ipc-channel)", "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "plugins 0.0.1", "profile_traits 0.0.1", "regex 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1427,6 +1380,11 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] +name = "ref_slice" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] name = "regex" version = "0.1.41" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1451,7 +1409,7 @@ name = "script" version = "0.0.1" dependencies = [ "angle 0.1.0 (git+https://github.com/ecoal95/angle?branch=servo)", - "app_units 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "app_units 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "canvas 0.0.1", "canvas_traits 0.0.1", @@ -1459,7 +1417,7 @@ dependencies = [ "cssparser 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "devtools_traits 0.0.1", "encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "html5ever 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1467,7 +1425,7 @@ dependencies = [ "ipc-channel 0.1.0 (git+https://github.com/servo/ipc-channel)", "js 0.1.1 (git+https://github.com/servo/rust-mozjs)", "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "msg 0.0.1", "net_traits 0.0.1", "num 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1475,6 +1433,7 @@ dependencies = [ "plugins 0.0.1", "profile_traits 0.0.1", "rand 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)", + "ref_slice 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", "script_traits 0.0.1", "selectors 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1497,9 +1456,9 @@ dependencies = [ name = "script_traits" version = "0.0.1" dependencies = [ - "app_units 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "app_units 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "devtools_traits 0.0.1", - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.1.0 (git+https://github.com/servo/ipc-channel)", "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "msg 0.0.1", @@ -1573,15 +1532,15 @@ dependencies = [ "devtools 0.0.1", "devtools_traits 0.0.1", "env_logger 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "gaol 0.0.1 (git+https://github.com/pcwalton/gaol)", "gfx 0.0.1", - "gleam 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", + "gleam 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.1.0 (git+https://github.com/servo/ipc-channel)", - "layers 0.1.0 (git+https://github.com/servo/rust-layers)", + "layers 0.2.0 (git+https://github.com/servo/rust-layers)", "layout 0.0.1", "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "msg 0.0.1", "net 0.0.1", "net_traits 0.0.1", @@ -1597,6 +1556,91 @@ dependencies = [ ] [[package]] +name = "servo-egl" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "servo-fontconfig" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "servo-fontconfig-sys 2.11.2-really.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "servo-fontconfig-sys" +version = "2.11.2-really.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "expat-sys 2.1.1-really.0 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "servo-freetype-sys 2.4.11 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "servo-freetype-sys" +version = "2.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "pkg-config 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "servo-glutin" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "android_glue 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "cgl 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cocoa 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "core-graphics 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "dwmapi-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "gdi32-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "gl_common 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "gl_generator 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "kernel32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "khronos_api 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "objc 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "osmesa-sys 0.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "shared_library 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "shell32-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "user32-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "wayland-client 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "wayland-kbd 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "wayland-window 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "x11 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "x11-dl 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "servo-skia" +version = "0.20130412.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cgl 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "expat-sys 2.1.1-really.0 (registry+https://github.com/rust-lang/crates.io-index)", + "gleam 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", + "glx 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "io-surface 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "servo-egl 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "servo-fontconfig 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "servo-freetype-sys 2.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "servo-glutin 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "x11 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] name = "shared_library" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1620,24 +1664,6 @@ version = "0.1.0" source = "git+https://github.com/huonw/simd#c4403387adb9a25188ff00ddc82582c2e1017030" [[package]] -name = "skia" -version = "0.0.20130412" -source = "git+https://github.com/servo/skia#a3102fc074612c9f44fb1b402fa1885bba25f233" -dependencies = [ - "cgl 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "egl 0.2.0 (git+https://github.com/servo/rust-egl)", - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "expat-sys 2.1.0 (git+https://github.com/servo/libexpat)", - "fontconfig 0.1.0 (git+https://github.com/servo/rust-fontconfig)", - "freetype-sys 2.4.11 (git+https://github.com/servo/libfreetype2)", - "gleam 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", - "glx 0.0.1 (git+https://github.com/servo/rust-glx)", - "io-surface 0.1.1 (git+https://github.com/servo/io-surface-rs)", - "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "x11 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] name = "smallvec" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1648,7 +1674,7 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "hpack 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1675,14 +1701,14 @@ dependencies = [ name = "style" version = "0.0.1" dependencies = [ - "app_units 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "app_units 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "cssparser 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "num 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", "plugins 0.0.1", @@ -1702,9 +1728,9 @@ name = "style_traits" version = "0.0.1" dependencies = [ "cssparser 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "num 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", "plugins 0.0.1", "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1835,20 +1861,20 @@ dependencies = [ name = "util" version = "0.0.1" dependencies = [ - "app_units 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "app_units 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "azure 0.2.0 (git+https://github.com/servo/rust-azure)", "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "cssparser 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", "html5ever 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.1.0 (git+https://github.com/servo/ipc-channel)", "js 0.1.1 (git+https://github.com/servo/rust-mozjs)", - "layers 0.1.0 (git+https://github.com/servo/rust-layers)", + "layers 0.2.0 (git+https://github.com/servo/rust-layers)", "lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "num 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", "plugins 0.0.1", @@ -1947,7 +1973,7 @@ dependencies = [ [[package]] name = "x11" -version = "2.1.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1965,7 +1991,7 @@ dependencies = [ [[package]] name = "xml-rs" -version = "0.1.26" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1976,7 +2002,7 @@ name = "xml5ever" version = "0.1.0" source = "git+https://github.com/Ygg01/xml5ever#9da3b1628bfcb69a48420f7aef69739d6706aa6a" dependencies = [ - "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "mac 0.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "phf 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)", "phf_codegen 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/ports/gonk/Cargo.toml b/ports/gonk/Cargo.toml index b8c3de2e583..f8c095bc270 100644 --- a/ports/gonk/Cargo.toml +++ b/ports/gonk/Cargo.toml @@ -49,5 +49,5 @@ url = "0.5" time = "0.1.17" errno = "0.1" libc = "0.2" -euclid = {version = "0.3", features = ["plugins"]} +euclid = {version = "0.4", features = ["plugins"]} gleam = "0.1" diff --git a/python/tidy.py b/python/tidy.py index 6f8b023f5cb..7a2993cdb6d 100644 --- a/python/tidy.py +++ b/python/tidy.py @@ -48,6 +48,8 @@ ignored_files = [ def should_check(file_name): + if os.path.basename(file_name) == "Cargo.lock": + return True if ".#" in file_name: return False if os.path.splitext(file_name)[1] not in filetypes_to_check: @@ -181,12 +183,12 @@ def check_lock(file_name, contents): packages[name] = (version, idx + 1, base_name) elif all([packages[name][0] != version, name not in exceptions, base_name not in exceptions]): line = idx + 1 - version_1 = tuple(map(int, packages[name][0].split('.'))) - version_2 = tuple(map(int, version.split('.'))) + version_1 = tuple(map(maybe_int, packages[name][0].split('.'))) + version_2 = tuple(map(maybe_int, version.split('.'))) if version_1 < version_2: # get the line & base package containing the older version packages[name], (version, line, base_name) = (version, line, base_name), packages[name] - message = 'conflicting versions for package "%s"' % name + message = 'duplicate versions for package "%s"' % name error = '\n\t\033[93mexpected maximum version "{}"\033[0m'.format(packages[name][0]) + \ '\n\t\033[91mbut, "{}" demands "{}"\033[0m' \ .format(base_name, version) @@ -198,6 +200,13 @@ def check_lock(file_name, contents): idx += 1 +def maybe_int(value): + try: + return int(value) + except ValueError: + return value + + def check_toml(file_name, contents): if not file_name.endswith(".toml"): raise StopIteration diff --git a/tests/ref/basic.list b/tests/ref/basic.list index fd5d92ec839..68a81c1b76d 100644 --- a/tests/ref/basic.list +++ b/tests/ref/basic.list @@ -13,17 +13,8 @@ fragment=top != ../html/acid2.html acid2_ref.html flaky_cpu == append_style_a.html append_style_b.html # `?` and `#` in the name is a test for https://github.com/servo/servo/issues/3340 -# Should be ==? -!= overflow_position_abs_inside_normal_a.html overflow_position_abs_inside_normal_b.html resolution=300x300,device-pixel-ratio=2 != pixel_snapping_border_a.html pixel_snapping_border_ref.html resolution=300x300,device-pixel-ratio=2 != pixel_snapping_position_a.html pixel_snapping_position_ref.html -# commented out because multiple layers don't work with reftests --pcwalton -# == position_fixed_a.html position_fixed_b.html -# == position_fixed_simple_a.html position_fixed_simple_b.html -# == position_fixed_static_y_a.html position_fixed_static_y_b.html -# text_decoration_propagation_a.html text_decoration_propagation_b.html -!= text_overflow_a.html text_overflow_ref.html -flaky_cpu,prefs:"layout.writing-mode.enabled" == vertical-lr-blocks.html vertical-lr-blocks_ref.html resolution=800x600 == viewport_percentage_vmin_vmax.html viewport_percentage_vmin_vmax_a.html # resolution=600x800 == viewport_percentage_vmin_vmax.html viewport_percentage_vmin_vmax_b.html resolution=800x600 == viewport_percentage_vw_vh.html viewport_percentage_vw_vh_a.html diff --git a/tests/unit/script/textinput.rs b/tests/unit/script/textinput.rs index 3d62f1f32ed..c5071f36090 100644 --- a/tests/unit/script/textinput.rs +++ b/tests/unit/script/textinput.rs @@ -13,11 +13,121 @@ use msg::constellation_msg::CONTROL; use msg::constellation_msg::SUPER; use msg::constellation_msg::{Key, KeyModifiers}; use script::clipboard_provider::DummyClipboardContext; -use script::textinput::{TextInput, Selection, Lines, Direction}; +use script::textinput::{TextInput, TextPoint, Selection, Lines, Direction}; use util::str::DOMString; fn text_input(lines: Lines, s: &str) -> TextInput<DummyClipboardContext> { - TextInput::new(lines, DOMString::from(s), DummyClipboardContext::new("")) + TextInput::new(lines, DOMString::from(s), DummyClipboardContext::new(""), None) +} + +#[test] +fn test_set_content_ignores_max_length() { + let mut textinput = TextInput::new( + Lines::Single, DOMString::from(""), DummyClipboardContext::new(""), Some(1) + ); + + textinput.set_content(DOMString::from("mozilla rocks")); + assert_eq!(textinput.get_content(), DOMString::from("mozilla rocks")); +} + +#[test] +fn test_textinput_when_inserting_multiple_lines_over_a_selection_respects_max_length() { + let mut textinput = TextInput::new( + Lines::Multiple, + DOMString::from("hello\nworld"), + DummyClipboardContext::new(""), + Some(17) + ); + + textinput.edit_point = TextPoint { line: 0, index: 1 }; + textinput.adjust_horizontal(3, Selection::Selected); + textinput.adjust_vertical(1, Selection::Selected); + + // Selection is now "hello\n + // ------ + // world" + // ---- + + textinput.insert_string("cruel\nterrible\nbad".to_string()); + + assert_eq!(textinput.get_content(), "hcruel\nterrible\nd"); +} + +#[test] +fn test_textinput_when_inserting_multiple_lines_still_respects_max_length() { + let mut textinput = TextInput::new( + Lines::Multiple, + DOMString::from("hello\nworld"), + DummyClipboardContext::new(""), + Some(17) + ); + + textinput.edit_point = TextPoint { line: 1, index: 0 }; + + textinput.insert_string("cruel\nterrible".to_string()); + + assert_eq!(textinput.get_content(), "hello\ncruel\nworld"); +} + +#[test] +fn test_textinput_when_content_is_already_longer_than_max_length_and_theres_no_selection_dont_insert_anything() { + let mut textinput = TextInput::new( + Lines::Single, + DOMString::from("abc"), + DummyClipboardContext::new(""), + Some(1) + ); + + textinput.insert_char('a'); + + assert_eq!(textinput.get_content(), "abc"); +} + +#[test] +fn test_multi_line_textinput_with_maxlength_doesnt_allow_appending_characters_when_input_spans_lines() { + let mut textinput = TextInput::new( + Lines::Multiple, + DOMString::from("abc\nd"), + DummyClipboardContext::new(""), + Some(5) + ); + + textinput.insert_char('a'); + + assert_eq!(textinput.get_content(), "abc\nd"); +} + +#[test] +fn test_single_line_textinput_with_max_length_doesnt_allow_appending_characters_when_replacing_a_selection() { + let mut textinput = TextInput::new( + Lines::Single, + DOMString::from("abcde"), + DummyClipboardContext::new(""), + Some(5) + ); + + textinput.edit_point = TextPoint { line: 0, index: 1 }; + textinput.adjust_horizontal(3, Selection::Selected); + + // Selection is now "abcde" + // --- + + textinput.replace_selection(DOMString::from("too long")); + + assert_eq!(textinput.get_content(), "atooe"); +} + +#[test] +fn test_single_line_textinput_with_max_length_doesnt_allow_appending_characters_after_max_length_is_reached() { + let mut textinput = TextInput::new( + Lines::Single, + DOMString::from("a"), + DummyClipboardContext::new(""), + Some(1) + ); + + textinput.insert_char('b'); + assert_eq!(textinput.get_content(), "a"); } #[test] @@ -199,7 +309,8 @@ fn test_clipboard_paste() { let mut textinput = TextInput::new(Lines::Single, DOMString::from("defg"), - DummyClipboardContext::new("abc")); + DummyClipboardContext::new("abc"), + None); assert_eq!(textinput.get_content(), "defg"); assert_eq!(textinput.edit_point.index, 0); textinput.handle_keydown_aux(Key::V, MODIFIERS); diff --git a/tests/unit/style/Cargo.toml b/tests/unit/style/Cargo.toml index b16c975b201..86b331249a9 100644 --- a/tests/unit/style/Cargo.toml +++ b/tests/unit/style/Cargo.toml @@ -26,4 +26,4 @@ url = "0.5" cssparser = "0.4" selectors = "0.2" string_cache = "0.2" -euclid = {version = "0.3", features = ["plugins"]} +euclid = {version = "0.4", features = ["plugins"]} diff --git a/tests/unit/style/attr.rs b/tests/unit/style/attr.rs new file mode 100644 index 00000000000..7aca499beae --- /dev/null +++ b/tests/unit/style/attr.rs @@ -0,0 +1,33 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +use style::attr::AttrValue; +use util::str::DOMString; + +#[test] +fn test_from_limited_i32_should_be_default_when_less_than_0() { + let value = DOMString::from("-1"); + match AttrValue::from_limited_i32(value, 0) { + AttrValue::Int(_, 0) => (), + _ => panic!("expected an IndexSize error") + } +} + +#[test] +fn test_from_limited_i32_should_parse_a_uint_when_value_is_0_or_greater() { + match AttrValue::from_limited_i32(DOMString::from("1"), 0) { + AttrValue::Int(_, 1) => (), + _ => panic!("expected an successful parsing") + } +} + +#[test] +fn test_from_limited_i32_should_keep_parsed_value_when_not_an_int() { + match AttrValue::from_limited_i32(DOMString::from("parsed-value"), 0) { + AttrValue::Int(p, 0) => { + assert_eq!(p, DOMString::from("parsed-value")) + }, + _ => panic!("expected an successful parsing") + } +} diff --git a/tests/unit/style/lib.rs b/tests/unit/style/lib.rs index 4963607fb7c..a405d76108d 100644 --- a/tests/unit/style/lib.rs +++ b/tests/unit/style/lib.rs @@ -20,6 +20,7 @@ extern crate util; #[cfg(test)] mod stylesheets; #[cfg(test)] mod media_queries; #[cfg(test)] mod viewport; +#[cfg(test)] mod attr; #[cfg(test)] mod writing_modes { use style::properties::{INITIAL_VALUES, get_writing_mode}; diff --git a/tests/unit/util/Cargo.toml b/tests/unit/util/Cargo.toml index d30bb9c0972..84f65cde523 100644 --- a/tests/unit/util/Cargo.toml +++ b/tests/unit/util/Cargo.toml @@ -18,5 +18,5 @@ path = "../../../components/plugins" [dependencies] app_units = {version = "0.1", features = ["plugins"]} libc = "0.2" -euclid = {version = "0.3", features = ["plugins"]} +euclid = {version = "0.4", features = ["plugins"]} diff --git a/tests/wpt/metadata/MANIFEST.json b/tests/wpt/metadata/MANIFEST.json index c244304742d..c1facfac86e 100644 --- a/tests/wpt/metadata/MANIFEST.json +++ b/tests/wpt/metadata/MANIFEST.json @@ -18012,6 +18012,10 @@ "url": "/html/semantics/forms/the-input-element/input-type-checkbox.html" }, { + "path": "html/semantics/forms/the-input-element/maxlength.html", + "url": "/html/semantics/forms/the-input-element/maxlength.html" + }, + { "path": "html/semantics/forms/the-input-element/month.html", "url": "/html/semantics/forms/the-input-element/month.html" }, @@ -30129,7 +30133,16 @@ }, "local_changes": { "deleted": [], - "items": {}, + "items": { + "manual": { + "html/semantics/forms/the-input-element/maxlength-manual.html": [ + { + "path": "html/semantics/forms/the-input-element/maxlength-manual.html", + "url": "/html/semantics/forms/the-input-element/maxlength-manual.html" + } + ] + } + }, "reftest_nodes": {} }, "reftest_nodes": { diff --git a/tests/wpt/metadata/XMLHttpRequest/overridemimetype-headers-received-state-force-shiftjis.htm.ini b/tests/wpt/metadata/XMLHttpRequest/overridemimetype-headers-received-state-force-shiftjis.htm.ini deleted file mode 100644 index d1e0a0d2114..00000000000 --- a/tests/wpt/metadata/XMLHttpRequest/overridemimetype-headers-received-state-force-shiftjis.htm.ini +++ /dev/null @@ -1,5 +0,0 @@ -[overridemimetype-headers-received-state-force-shiftjis.htm] - type: testharness - [XMLHttpRequest: overrideMimeType() in HEADERS RECEIVED state, enforcing Shift-JIS encoding] - expected: FAIL - diff --git a/tests/wpt/metadata/XMLHttpRequest/overridemimetype-open-state-force-utf-8.htm.ini b/tests/wpt/metadata/XMLHttpRequest/overridemimetype-open-state-force-utf-8.htm.ini deleted file mode 100644 index 8138e2ed72a..00000000000 --- a/tests/wpt/metadata/XMLHttpRequest/overridemimetype-open-state-force-utf-8.htm.ini +++ /dev/null @@ -1,6 +0,0 @@ -[overridemimetype-open-state-force-utf-8.htm] - type: testharness - expected: TIMEOUT - [XMLHttpRequest: overrideMimeType() in open state, enforcing UTF-8 encoding] - expected: TIMEOUT - diff --git a/tests/wpt/metadata/XMLHttpRequest/overridemimetype-unsent-state-force-shiftjis.htm.ini b/tests/wpt/metadata/XMLHttpRequest/overridemimetype-unsent-state-force-shiftjis.htm.ini deleted file mode 100644 index 625100da359..00000000000 --- a/tests/wpt/metadata/XMLHttpRequest/overridemimetype-unsent-state-force-shiftjis.htm.ini +++ /dev/null @@ -1,6 +0,0 @@ -[overridemimetype-unsent-state-force-shiftjis.htm] - type: testharness - expected: TIMEOUT - [XMLHttpRequest: overrideMimeType() in unsent state, enforcing Shift-JIS encoding] - expected: TIMEOUT - diff --git a/tests/wpt/metadata/html/browsers/the-window-object/window-properties.html.ini b/tests/wpt/metadata/html/browsers/the-window-object/window-properties.html.ini index 68049100081..8cb02cd8c36 100644 --- a/tests/wpt/metadata/html/browsers/the-window-object/window-properties.html.ini +++ b/tests/wpt/metadata/html/browsers/the-window-object/window-properties.html.ini @@ -300,9 +300,6 @@ [Window unforgeable attribute: window] expected: FAIL - [Window unforgeable attribute: document] - expected: FAIL - [Window unforgeable attribute: location] expected: FAIL diff --git a/tests/wpt/metadata/html/dom/interfaces.html.ini b/tests/wpt/metadata/html/dom/interfaces.html.ini index a292516b1e5..5bbbf4ef069 100644 --- a/tests/wpt/metadata/html/dom/interfaces.html.ini +++ b/tests/wpt/metadata/html/dom/interfaces.html.ini @@ -4860,9 +4860,6 @@ [HTMLInputElement interface: attribute max] expected: FAIL - [HTMLInputElement interface: attribute maxLength] - expected: FAIL - [HTMLInputElement interface: attribute min] expected: FAIL @@ -4983,9 +4980,6 @@ [HTMLInputElement interface: document.createElement("input") must inherit property "max" with the proper type (19)] expected: FAIL - [HTMLInputElement interface: document.createElement("input") must inherit property "maxLength" with the proper type (20)] - expected: FAIL - [HTMLInputElement interface: document.createElement("input") must inherit property "min" with the proper type (21)] expected: FAIL @@ -6852,9 +6846,6 @@ [Window interface: window must inherit property "self" with the proper type (1)] expected: FAIL - [Window interface: window must have own property "document"] - expected: FAIL - [Window interface: window must inherit property "name" with the proper type (3)] expected: FAIL @@ -8487,18 +8478,9 @@ [Window interface: window must inherit property "localStorage" with the proper type (124)] expected: FAIL - [Location interface: window.location must have own property "assign"] - expected: FAIL - - [Location interface: calling assign(DOMString) on window.location with too few arguments must throw TypeError] - expected: FAIL - [Location interface: window.location must have own property "replace"] expected: FAIL - [Location interface: window.location must have own property "reload"] - expected: FAIL - [HTMLOptionElement must be primary interface of new Option()] expected: FAIL @@ -9357,36 +9339,9 @@ [HTMLAreaElement interface: document.createElement("area") must inherit property "hash" with the proper type (19)] expected: FAIL - [Location interface: window.location must have own property "href"] - expected: FAIL - [Location interface: window.location must have own property "origin"] expected: FAIL - [Location interface: window.location must have own property "protocol"] - expected: FAIL - - [Location interface: window.location must have own property "host"] - expected: FAIL - - [Location interface: window.location must have own property "hostname"] - expected: FAIL - - [Location interface: window.location must have own property "port"] - expected: FAIL - - [Location interface: window.location must have own property "pathname"] - expected: FAIL - - [Location interface: window.location must have own property "search"] - expected: FAIL - - [Location interface: window.location must have own property "hash"] - expected: FAIL - - [Location interface: calling assign(USVString) on window.location with too few arguments must throw TypeError] - expected: FAIL - [Location interface: calling replace(USVString) on window.location with too few arguments must throw TypeError] expected: FAIL diff --git a/tests/wpt/metadata/html/dom/reflection-forms.html.ini b/tests/wpt/metadata/html/dom/reflection-forms.html.ini index 21effce681d..0084a038644 100644 --- a/tests/wpt/metadata/html/dom/reflection-forms.html.ini +++ b/tests/wpt/metadata/html/dom/reflection-forms.html.ini @@ -4977,189 +4977,6 @@ [input.max: IDL set to object "test-valueOf" followed by IDL get] expected: FAIL - [input.maxLength: typeof IDL attribute] - expected: FAIL - - [input.maxLength: IDL get with DOM attribute unset] - expected: FAIL - - [input.maxLength: setAttribute() to -2147483649 followed by IDL get] - expected: FAIL - - [input.maxLength: setAttribute() to -2147483648 followed by IDL get] - expected: FAIL - - [input.maxLength: setAttribute() to -36 followed by IDL get] - expected: FAIL - - [input.maxLength: setAttribute() to -1 followed by IDL get] - expected: FAIL - - [input.maxLength: setAttribute() to -0 followed by IDL get] - expected: FAIL - - [input.maxLength: setAttribute() to 0 followed by IDL get] - expected: FAIL - - [input.maxLength: setAttribute() to 1 followed by IDL get] - expected: FAIL - - [input.maxLength: setAttribute() to 2147483647 followed by IDL get] - expected: FAIL - - [input.maxLength: setAttribute() to 2147483648 followed by IDL get] - expected: FAIL - - [input.maxLength: setAttribute() to 4294967295 followed by IDL get] - expected: FAIL - - [input.maxLength: setAttribute() to 4294967296 followed by IDL get] - expected: FAIL - - [input.maxLength: setAttribute() to "" followed by IDL get] - expected: FAIL - - [input.maxLength: setAttribute() to "-1" followed by IDL get] - expected: FAIL - - [input.maxLength: setAttribute() to "-0" followed by IDL get] - expected: FAIL - - [input.maxLength: setAttribute() to "0" followed by IDL get] - expected: FAIL - - [input.maxLength: setAttribute() to "1" followed by IDL get] - expected: FAIL - - [input.maxLength: 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 - - [input.maxLength: setAttribute() to "\\t7" followed by IDL get] - expected: FAIL - - [input.maxLength: setAttribute() to "\\v7" followed by IDL get] - expected: FAIL - - [input.maxLength: setAttribute() to "\\f7" followed by IDL get] - expected: FAIL - - [input.maxLength: setAttribute() to " 7" followed by IDL get] - expected: FAIL - - [input.maxLength: setAttribute() to " 7" followed by IDL get] - expected: FAIL - - [input.maxLength: setAttribute() to "7" followed by IDL get] - expected: FAIL - - [input.maxLength: setAttribute() to "\\n7" followed by IDL get] - expected: FAIL - - [input.maxLength: setAttribute() to "\\r7" followed by IDL get] - expected: FAIL - - [input.maxLength: setAttribute() to "
7" followed by IDL get] - expected: FAIL - - [input.maxLength: setAttribute() to "
7" followed by IDL get] - expected: FAIL - - [input.maxLength: setAttribute() to " 7" followed by IDL get] - expected: FAIL - - [input.maxLength: setAttribute() to "7" followed by IDL get] - expected: FAIL - - [input.maxLength: setAttribute() to " 7" followed by IDL get] - expected: FAIL - - [input.maxLength: setAttribute() to " 7" followed by IDL get] - expected: FAIL - - [input.maxLength: setAttribute() to " 7" followed by IDL get] - expected: FAIL - - [input.maxLength: setAttribute() to " 7" followed by IDL get] - expected: FAIL - - [input.maxLength: setAttribute() to " 7" followed by IDL get] - expected: FAIL - - [input.maxLength: setAttribute() to " 7" followed by IDL get] - expected: FAIL - - [input.maxLength: setAttribute() to " 7" followed by IDL get] - expected: FAIL - - [input.maxLength: setAttribute() to " 7" followed by IDL get] - expected: FAIL - - [input.maxLength: setAttribute() to " 7" followed by IDL get] - expected: FAIL - - [input.maxLength: setAttribute() to " 7" followed by IDL get] - expected: FAIL - - [input.maxLength: setAttribute() to " 7" followed by IDL get] - expected: FAIL - - [input.maxLength: setAttribute() to " 7" followed by IDL get] - expected: FAIL - - [input.maxLength: setAttribute() to " 7" followed by IDL get] - expected: FAIL - - [input.maxLength: setAttribute() to undefined followed by IDL get] - expected: FAIL - - [input.maxLength: setAttribute() to 1.5 followed by IDL get] - expected: FAIL - - [input.maxLength: setAttribute() to true followed by IDL get] - expected: FAIL - - [input.maxLength: setAttribute() to false followed by IDL get] - expected: FAIL - - [input.maxLength: setAttribute() to object "[object Object\]" followed by IDL get] - expected: FAIL - - [input.maxLength: setAttribute() to NaN followed by IDL get] - expected: FAIL - - [input.maxLength: setAttribute() to Infinity followed by IDL get] - expected: FAIL - - [input.maxLength: setAttribute() to -Infinity followed by IDL get] - expected: FAIL - - [input.maxLength: setAttribute() to "\\0" followed by IDL get] - expected: FAIL - - [input.maxLength: setAttribute() to object "2" followed by IDL get] - expected: FAIL - - [input.maxLength: setAttribute() to object "3" followed by IDL get] - expected: FAIL - - [input.maxLength: IDL set to -2147483648 must throw INDEX_SIZE_ERR] - expected: FAIL - - [input.maxLength: IDL set to -36 must throw INDEX_SIZE_ERR] - expected: FAIL - - [input.maxLength: IDL set to -1 must throw INDEX_SIZE_ERR] - expected: FAIL - - [input.maxLength: IDL set to 0 followed by getAttribute()] - expected: FAIL - - [input.maxLength: IDL set to 1 followed by getAttribute()] - expected: FAIL - - [input.maxLength: IDL set to 2147483647 followed by getAttribute()] - expected: FAIL - [input.min: typeof IDL attribute] expected: FAIL diff --git a/tests/wpt/metadata/webgl/bufferSubData.html.ini b/tests/wpt/metadata/webgl/bufferSubData.html.ini deleted file mode 100644 index 07bf6509c34..00000000000 --- a/tests/wpt/metadata/webgl/bufferSubData.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[bufferSubData.html] - type: testharness - disabled: https://github.com/servo/servo/issues/8462 diff --git a/tests/wpt/metadata/webgl/compressedTexImage2D.html.ini b/tests/wpt/metadata/webgl/compressedTexImage2D.html.ini deleted file mode 100644 index 9e89b8cdb0f..00000000000 --- a/tests/wpt/metadata/webgl/compressedTexImage2D.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[compressedTexImage2D.html] - type: testharness - disabled: https://github.com/servo/servo/issues/8462 diff --git a/tests/wpt/metadata/webgl/compressedTexSubImage2D.html.ini b/tests/wpt/metadata/webgl/compressedTexSubImage2D.html.ini deleted file mode 100644 index cbeef41eb4f..00000000000 --- a/tests/wpt/metadata/webgl/compressedTexSubImage2D.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[compressedTexSubImage2D.html] - type: testharness - disabled: https://github.com/servo/servo/issues/8462 diff --git a/tests/wpt/metadata/websockets/Secure-Close-1005-verify-code.htm.ini b/tests/wpt/metadata/websockets/Secure-Close-1005-verify-code.htm.ini deleted file mode 100644 index be57e845e2a..00000000000 --- a/tests/wpt/metadata/websockets/Secure-Close-1005-verify-code.htm.ini +++ /dev/null @@ -1,5 +0,0 @@ -[Secure-Close-1005-verify-code.htm] - type: testharness - [W3C WebSocket API - Create Secure WebSocket - Close the Connection - close() - return close code is 1005 - Connection should be closed] - expected: FAIL - diff --git a/tests/wpt/mozilla/meta/MANIFEST.json b/tests/wpt/mozilla/meta/MANIFEST.json index e2b7aa33d2d..7aaa534b278 100644 --- a/tests/wpt/mozilla/meta/MANIFEST.json +++ b/tests/wpt/mozilla/meta/MANIFEST.json @@ -3295,6 +3295,18 @@ "url": "/_mozilla/css/overflow_position_abs_inline_block.html" } ], + "css/overflow_position_abs_inside_normal_a.html": [ + { + "path": "css/overflow_position_abs_inside_normal_a.html", + "references": [ + [ + "/_mozilla/css/overflow_position_abs_inside_normal_b.html", + "==" + ] + ], + "url": "/_mozilla/css/overflow_position_abs_inside_normal_a.html" + } + ], "css/overflow_position_abs_simple_a.html": [ { "path": "css/overflow_position_abs_simple_a.html", @@ -3547,6 +3559,18 @@ "url": "/_mozilla/css/position_abs_width_percentage_a.html" } ], + "css/position_fixed_a.html": [ + { + "path": "css/position_fixed_a.html", + "references": [ + [ + "/_mozilla/css/position_fixed_b.html", + "==" + ] + ], + "url": "/_mozilla/css/position_fixed_a.html" + } + ], "css/position_fixed_background_color_a.html": [ { "path": "css/position_fixed_background_color_a.html", @@ -3571,6 +3595,30 @@ "url": "/_mozilla/css/position_fixed_overflow_a.html" } ], + "css/position_fixed_simple_a.html": [ + { + "path": "css/position_fixed_simple_a.html", + "references": [ + [ + "/_mozilla/css/position_fixed_simple_b.html", + "==" + ] + ], + "url": "/_mozilla/css/position_fixed_simple_a.html" + } + ], + "css/position_fixed_static_y_a.html": [ + { + "path": "css/position_fixed_static_y_a.html", + "references": [ + [ + "/_mozilla/css/position_fixed_static_y_b.html", + "==" + ] + ], + "url": "/_mozilla/css/position_fixed_static_y_a.html" + } + ], "css/position_fixed_tile_edge.html": [ { "path": "css/position_fixed_tile_edge.html", @@ -4327,6 +4375,18 @@ "url": "/_mozilla/css/text_decoration_cached.html" } ], + "css/text_decoration_propagation_a.html": [ + { + "path": "css/text_decoration_propagation_a.html", + "references": [ + [ + "/_mozilla/css/text_decoration_propagation_b.html", + "==" + ] + ], + "url": "/_mozilla/css/text_decoration_propagation_a.html" + } + ], "css/text_decoration_smoke_a.html": [ { "path": "css/text_decoration_smoke_a.html", @@ -4375,6 +4435,18 @@ "url": "/_mozilla/css/text_justify_none_a.html" } ], + "css/text_overflow_a.html": [ + { + "path": "css/text_overflow_a.html", + "references": [ + [ + "/_mozilla/css/text_overflow_ref.html", + "!=" + ] + ], + "url": "/_mozilla/css/text_overflow_a.html" + } + ], "css/text_overflow_basic_a.html": [ { "path": "css/text_overflow_basic_a.html", @@ -4579,6 +4651,18 @@ "url": "/_mozilla/css/upper_id_attr.html" } ], + "css/vertical-lr-blocks.html": [ + { + "path": "css/vertical-lr-blocks.html", + "references": [ + [ + "/_mozilla/css/vertical-lr-blocks_ref.html", + "==" + ] + ], + "url": "/_mozilla/css/vertical-lr-blocks.html" + } + ], "css/vertical_align_bottom_a.html": [ { "path": "css/vertical_align_bottom_a.html", @@ -5451,6 +5535,12 @@ "url": "/_mozilla/mozilla/follow-hyperlink.html" } ], + "mozilla/form_submit_about.html": [ + { + "path": "mozilla/form_submit_about.html", + "url": "/_mozilla/mozilla/form_submit_about.html" + } + ], "mozilla/getBoundingClientRect.html": [ { "path": "mozilla/getBoundingClientRect.html", @@ -9018,6 +9108,18 @@ "url": "/_mozilla/css/overflow_position_abs_inline_block.html" } ], + "css/overflow_position_abs_inside_normal_a.html": [ + { + "path": "css/overflow_position_abs_inside_normal_a.html", + "references": [ + [ + "/_mozilla/css/overflow_position_abs_inside_normal_b.html", + "==" + ] + ], + "url": "/_mozilla/css/overflow_position_abs_inside_normal_a.html" + } + ], "css/overflow_position_abs_simple_a.html": [ { "path": "css/overflow_position_abs_simple_a.html", @@ -9270,6 +9372,18 @@ "url": "/_mozilla/css/position_abs_width_percentage_a.html" } ], + "css/position_fixed_a.html": [ + { + "path": "css/position_fixed_a.html", + "references": [ + [ + "/_mozilla/css/position_fixed_b.html", + "==" + ] + ], + "url": "/_mozilla/css/position_fixed_a.html" + } + ], "css/position_fixed_background_color_a.html": [ { "path": "css/position_fixed_background_color_a.html", @@ -9294,6 +9408,30 @@ "url": "/_mozilla/css/position_fixed_overflow_a.html" } ], + "css/position_fixed_simple_a.html": [ + { + "path": "css/position_fixed_simple_a.html", + "references": [ + [ + "/_mozilla/css/position_fixed_simple_b.html", + "==" + ] + ], + "url": "/_mozilla/css/position_fixed_simple_a.html" + } + ], + "css/position_fixed_static_y_a.html": [ + { + "path": "css/position_fixed_static_y_a.html", + "references": [ + [ + "/_mozilla/css/position_fixed_static_y_b.html", + "==" + ] + ], + "url": "/_mozilla/css/position_fixed_static_y_a.html" + } + ], "css/position_fixed_tile_edge.html": [ { "path": "css/position_fixed_tile_edge.html", @@ -10050,6 +10188,18 @@ "url": "/_mozilla/css/text_decoration_cached.html" } ], + "css/text_decoration_propagation_a.html": [ + { + "path": "css/text_decoration_propagation_a.html", + "references": [ + [ + "/_mozilla/css/text_decoration_propagation_b.html", + "==" + ] + ], + "url": "/_mozilla/css/text_decoration_propagation_a.html" + } + ], "css/text_decoration_smoke_a.html": [ { "path": "css/text_decoration_smoke_a.html", @@ -10098,6 +10248,18 @@ "url": "/_mozilla/css/text_justify_none_a.html" } ], + "css/text_overflow_a.html": [ + { + "path": "css/text_overflow_a.html", + "references": [ + [ + "/_mozilla/css/text_overflow_ref.html", + "!=" + ] + ], + "url": "/_mozilla/css/text_overflow_a.html" + } + ], "css/text_overflow_basic_a.html": [ { "path": "css/text_overflow_basic_a.html", @@ -10302,6 +10464,18 @@ "url": "/_mozilla/css/upper_id_attr.html" } ], + "css/vertical-lr-blocks.html": [ + { + "path": "css/vertical-lr-blocks.html", + "references": [ + [ + "/_mozilla/css/vertical-lr-blocks_ref.html", + "==" + ] + ], + "url": "/_mozilla/css/vertical-lr-blocks.html" + } + ], "css/vertical_align_bottom_a.html": [ { "path": "css/vertical_align_bottom_a.html", diff --git a/tests/wpt/mozilla/meta/css/overflow_position_abs_inside_normal_a.html.ini b/tests/wpt/mozilla/meta/css/overflow_position_abs_inside_normal_a.html.ini new file mode 100644 index 00000000000..7a3a9f959fa --- /dev/null +++ b/tests/wpt/mozilla/meta/css/overflow_position_abs_inside_normal_a.html.ini @@ -0,0 +1,4 @@ +[overflow_position_abs_inside_normal_a.html] + type: reftest + expected: FAIL + bug: https://github.com/servo/servo/issues/8780 diff --git a/tests/wpt/mozilla/meta/css/text_decoration_propagation_a.html.ini b/tests/wpt/mozilla/meta/css/text_decoration_propagation_a.html.ini new file mode 100644 index 00000000000..12d7ad7b519 --- /dev/null +++ b/tests/wpt/mozilla/meta/css/text_decoration_propagation_a.html.ini @@ -0,0 +1,4 @@ +[text_decoration_propagation_a.html] + type: reftest + expected: FAIL + bug: https://github.com/servo/servo/issues/8783 diff --git a/tests/wpt/mozilla/meta/css/vertical-lr-blocks.html.ini b/tests/wpt/mozilla/meta/css/vertical-lr-blocks.html.ini new file mode 100644 index 00000000000..2858c27f6ed --- /dev/null +++ b/tests/wpt/mozilla/meta/css/vertical-lr-blocks.html.ini @@ -0,0 +1,5 @@ +prefs: [layout.writing-mode.enabled:true] +[vertical-lr-blocks.html] + type: reftest + expected: FAIL + bug: https://github.com/servo/servo/issues/3926 diff --git a/tests/wpt/mozilla/meta/mozilla/windowproxy.html.ini b/tests/wpt/mozilla/meta/mozilla/windowproxy.html.ini index ef3f60406f0..b2d6e8a1da1 100644 --- a/tests/wpt/mozilla/meta/mozilla/windowproxy.html.ini +++ b/tests/wpt/mozilla/meta/mozilla/windowproxy.html.ini @@ -1,5 +1,5 @@ [windowproxy.html] type: testharness - [Unforgeable location] + [document.location is the right thing on non-rendered document] expected: FAIL diff --git a/tests/ref/overflow_position_abs_inside_normal_a.html b/tests/wpt/mozilla/tests/css/overflow_position_abs_inside_normal_a.html index aa9a3f11b7b..344f43abd3e 100644 --- a/tests/ref/overflow_position_abs_inside_normal_a.html +++ b/tests/wpt/mozilla/tests/css/overflow_position_abs_inside_normal_a.html @@ -3,6 +3,7 @@ `overflow: hidden` on #second has no effect on #abs because its CB is #first. </title> <head> + <link rel=match href=overflow_position_abs_inside_normal_b.html> <style> #first { position: relative; diff --git a/tests/ref/overflow_position_abs_inside_normal_b.html b/tests/wpt/mozilla/tests/css/overflow_position_abs_inside_normal_b.html index 6d0bb81e4be..6d0bb81e4be 100644 --- a/tests/ref/overflow_position_abs_inside_normal_b.html +++ b/tests/wpt/mozilla/tests/css/overflow_position_abs_inside_normal_b.html diff --git a/tests/ref/position_fixed_a.html b/tests/wpt/mozilla/tests/css/position_fixed_a.html index 1fe3fc1ec45..961613c7f6c 100644 --- a/tests/ref/position_fixed_a.html +++ b/tests/wpt/mozilla/tests/css/position_fixed_a.html @@ -1,5 +1,6 @@ <html> <head> + <link rel=match href=position_fixed_b.html> <style> .container { display: block; diff --git a/tests/ref/position_fixed_b.html b/tests/wpt/mozilla/tests/css/position_fixed_b.html index 1fe3fc1ec45..1fe3fc1ec45 100644 --- a/tests/ref/position_fixed_b.html +++ b/tests/wpt/mozilla/tests/css/position_fixed_b.html diff --git a/tests/ref/position_fixed_simple_a.html b/tests/wpt/mozilla/tests/css/position_fixed_simple_a.html index 83e7cc72a78..d01b9550911 100644 --- a/tests/ref/position_fixed_simple_a.html +++ b/tests/wpt/mozilla/tests/css/position_fixed_simple_a.html @@ -1,5 +1,6 @@ <html> <head> + <link rel=match href=position_fixed_simple_b.html> <style> html, body { margin: 0px; diff --git a/tests/ref/position_fixed_simple_b.html b/tests/wpt/mozilla/tests/css/position_fixed_simple_b.html index 67ddd4208e6..67ddd4208e6 100644 --- a/tests/ref/position_fixed_simple_b.html +++ b/tests/wpt/mozilla/tests/css/position_fixed_simple_b.html diff --git a/tests/ref/position_fixed_static_y_a.html b/tests/wpt/mozilla/tests/css/position_fixed_static_y_a.html index 5d44f77006f..f7c7d5b1f93 100644 --- a/tests/ref/position_fixed_static_y_a.html +++ b/tests/wpt/mozilla/tests/css/position_fixed_static_y_a.html @@ -1,5 +1,6 @@ <html> <head> + <link rel=match href=position_fixed_static_y_b.html> <style> html, body { margin-left: 0px; diff --git a/tests/ref/position_fixed_static_y_b.html b/tests/wpt/mozilla/tests/css/position_fixed_static_y_b.html index 0b9ab5568ef..0b9ab5568ef 100644 --- a/tests/ref/position_fixed_static_y_b.html +++ b/tests/wpt/mozilla/tests/css/position_fixed_static_y_b.html diff --git a/tests/ref/text_decoration_propagation_a.html b/tests/wpt/mozilla/tests/css/text_decoration_propagation_a.html index 4811fbb2a2a..52975110ef0 100644 --- a/tests/ref/text_decoration_propagation_a.html +++ b/tests/wpt/mozilla/tests/css/text_decoration_propagation_a.html @@ -2,6 +2,7 @@ <html> <head> <title>I CAN'T LIVE ANOTHER DAY WITHOUT AIR CONDITIONING!</title> +<link rel=match href=text_decoration_propagation_b.html> <style> #a { text-decoration: underline; diff --git a/tests/ref/text_decoration_propagation_b.html b/tests/wpt/mozilla/tests/css/text_decoration_propagation_b.html index ff7473ec78e..ff7473ec78e 100644 --- a/tests/ref/text_decoration_propagation_b.html +++ b/tests/wpt/mozilla/tests/css/text_decoration_propagation_b.html diff --git a/tests/ref/text_overflow_a.html b/tests/wpt/mozilla/tests/css/text_overflow_a.html index 70818c2b914..2a3ca5be0f7 100644 --- a/tests/ref/text_overflow_a.html +++ b/tests/wpt/mozilla/tests/css/text_overflow_a.html @@ -1,6 +1,7 @@ <!DOCTYPE html> <html> <head> +<link rel=mismatch href=text_overflow_ref.html> <style> p { width: 128px; diff --git a/tests/ref/text_overflow_ref.html b/tests/wpt/mozilla/tests/css/text_overflow_ref.html index 19adf5d9104..19adf5d9104 100644 --- a/tests/ref/text_overflow_ref.html +++ b/tests/wpt/mozilla/tests/css/text_overflow_ref.html diff --git a/tests/ref/vertical-lr-blocks.html b/tests/wpt/mozilla/tests/css/vertical-lr-blocks.html index c68fee90788..46d8586a6fc 100644 --- a/tests/ref/vertical-lr-blocks.html +++ b/tests/wpt/mozilla/tests/css/vertical-lr-blocks.html @@ -1,6 +1,7 @@ <!doctype html> <html> <head> +<link rel=match href=vertical-lr-blocks_ref.html> <style> html { writing-mode: vertical-rl } body { margin: 10px } diff --git a/tests/ref/vertical-lr-blocks_ref.html b/tests/wpt/mozilla/tests/css/vertical-lr-blocks_ref.html index 8581695c49f..8581695c49f 100644 --- a/tests/ref/vertical-lr-blocks_ref.html +++ b/tests/wpt/mozilla/tests/css/vertical-lr-blocks_ref.html diff --git a/tests/wpt/mozilla/tests/mozilla/form_submit_about.html b/tests/wpt/mozilla/tests/mozilla/form_submit_about.html new file mode 100644 index 00000000000..ec572ab0bc6 --- /dev/null +++ b/tests/wpt/mozilla/tests/mozilla/form_submit_about.html @@ -0,0 +1,15 @@ +<html> + <head> + <script src=/resources/testharness.js></script> + <script src=/resources/testharnessreport.js></script> + </head> + <body> + <iframe src="form_submit_about_frame.html" id="foo"></iframe> + <script> + var numOnLoads = 0 + var t = async_test("about:blank as form target") + var iframe = document.getElementById('foo') + iframe.onload = t.step_func(function(e) { if (++numOnLoads == 2) t.done() }) + </script> + </body> +</html> diff --git a/tests/wpt/mozilla/tests/mozilla/form_submit_about_frame.html b/tests/wpt/mozilla/tests/mozilla/form_submit_about_frame.html new file mode 100644 index 00000000000..7beb90f1ab7 --- /dev/null +++ b/tests/wpt/mozilla/tests/mozilla/form_submit_about_frame.html @@ -0,0 +1,13 @@ +<!DOCTYPE html> +<html> + <body> + <form name="my" action="about:blank"> + <input type="submit" value="Submit about:blank"/> + </form> + <script> + window.onload = function() { + document.forms["my"].submit(); + } + </script> + </body> +</html> diff --git a/tests/wpt/mozilla/tests/mozilla/windowproxy.html b/tests/wpt/mozilla/tests/mozilla/windowproxy.html index 8ea7fc43392..d5c75899eb5 100644 --- a/tests/wpt/mozilla/tests/mozilla/windowproxy.html +++ b/tests/wpt/mozilla/tests/mozilla/windowproxy.html @@ -5,6 +5,7 @@ </head> <body> <div></div> +<img name="location"> <script> test(function() { window.abcd = 15; @@ -23,6 +24,18 @@ test(function() { test(function() { assert_own_property(window, 'location') }, "Unforgeable location"); + +test(function() { + document.foo + assert_equals(document.location, window.location, + 'The <img name="location"> should not override the location getter'); +}, "document.location is the right thing"); + +test(function() { + var doc = new DOMParser().parseFromString("<img name='location'>", "text/html"); + assert_equals(doc.location, null, + 'The <img name="location"> should not override the location getter on a data document'); +}, "document.location is the right thing on non-rendered document"); </script> </body> </html> diff --git a/tests/wpt/web-platform-tests/html/semantics/forms/the-input-element/maxlength-manual.html b/tests/wpt/web-platform-tests/html/semantics/forms/the-input-element/maxlength-manual.html new file mode 100644 index 00000000000..fdf6c264410 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/forms/the-input-element/maxlength-manual.html @@ -0,0 +1,37 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset=utf-8> + <title>input max length</title> + <link rel="author" title="Sam Gibson" href="mailto:sam@ifdown.net"> + <link rel=help href="https://html.spec.whatwg.org/multipage/forms.html#the-maxlength-and-minlength-attributes"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + </head> + + <body> + <div id="log"></div> + <p>Type a letter anywhere into the input field (do not select any text, or otherwise manipulate the input)</p> + <input type=text maxlength=4 id=only-four value="inpu"></input> + + <script> + var input; + setup(function() { + input = document.getElementById('only-four'); + }, {explicit_done: true, explicit_timeout: true}); + + + on_event(input, 'keyup', function(event) { + if ((event.keyCode >= 65 && event.keyCode <= 90) || + (event.keyCode >= 97 && event.keyCode <= 122)) { + test(function() { + assert_equals(input.value, "inpu"); + }, 'input content should limit to maxlength') + + done(); + } + }); + </script> + </body> +</html> + diff --git a/tests/wpt/web-platform-tests/html/semantics/forms/the-input-element/maxlength.html b/tests/wpt/web-platform-tests/html/semantics/forms/the-input-element/maxlength.html new file mode 100644 index 00000000000..8f0a2567d40 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/forms/the-input-element/maxlength.html @@ -0,0 +1,55 @@ +<!DOCTYPE html> +<html> + <head> + <title>input max length</title> + <link rel="author" title="Sam Gibson" href="mailto:sam@ifdown.net"> + <link rel=help href="https://html.spec.whatwg.org/multipage/forms.html#the-maxlength-and-minlength-attributes"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + </head> + + <body> + <h1>Text input element</h1> + + <div style="display: none"> + <input id="none" /> + <input id="negative" type="-5" /> + <input id="non-numeric" type="not-a-number" /> + <input id="assign-negative" /> + <input id="assign-non-numeric" /> + </div> + + <div id="log"></div> + + <script type="text/javascript"> + test( + function() { + assert_equals(document.getElementById("none").maxLength, -1); + }, "Unset maxlength is -1"); + + test( + function() { + assert_equals(document.getElementById("negative").maxLength, -1); + }, "Negative maxlength is always -1"); + + test( + function() { + assert_equals(document.getElementById("non-numeric").maxLength, -1); + }, "Non-numeric maxlength is -1"); + + test( + function() { + assert_throws("INDEX_SIZE_ERR", function() { + document.getElementById("assign-negative").maxLength = -5; + }); + }, "Assigning negative integer throws IndexSizeError"); + + test( + function() { + document.getElementById("assign-non-numeric").maxLength = "not-a-number"; + assert_equals(document.getElementById("assign-non-numeric").maxLength, 0); + }, "Assigning non-numeric to maxlength sets maxlength to 0"); + </script> + </body> +</html> + |