gecko-dev/servo/components/script/lib.rs

179 lines
4.6 KiB
Rust
Raw Normal View History

servo: Merge #474 - Separate the DOM and layout into separate crates (from pcwalton:separation); r=pcwalton r? @metajack Source-Repo: https://github.com/servo/servo Source-Revision: 473b0941eca8c6498e5065892de49562dce0b78c --HG-- rename : servo/src/components/main/dom/bindings/clientrect.rs => servo/src/components/script/dom/bindings/clientrect.rs rename : servo/src/components/main/dom/bindings/clientrectlist.rs => servo/src/components/script/dom/bindings/clientrectlist.rs rename : servo/src/components/main/dom/bindings/codegen/BindingGen.py => servo/src/components/script/dom/bindings/codegen/BindingGen.py rename : servo/src/components/main/dom/bindings/codegen/BindingUtils.cpp => servo/src/components/script/dom/bindings/codegen/BindingUtils.cpp rename : servo/src/components/main/dom/bindings/codegen/BindingUtils.h => servo/src/components/script/dom/bindings/codegen/BindingUtils.h rename : servo/src/components/main/dom/bindings/codegen/Bindings.conf => servo/src/components/script/dom/bindings/codegen/Bindings.conf rename : servo/src/components/main/dom/bindings/codegen/ClientRect.webidl => servo/src/components/script/dom/bindings/codegen/ClientRect.webidl rename : servo/src/components/main/dom/bindings/codegen/ClientRectList.webidl => servo/src/components/script/dom/bindings/codegen/ClientRectList.webidl rename : servo/src/components/main/dom/bindings/codegen/Codegen.py => servo/src/components/script/dom/bindings/codegen/Codegen.py rename : servo/src/components/main/dom/bindings/codegen/CodegenRust.py => servo/src/components/script/dom/bindings/codegen/CodegenRust.py rename : servo/src/components/main/dom/bindings/codegen/Configuration.py => servo/src/components/script/dom/bindings/codegen/Configuration.py rename : servo/src/components/main/dom/bindings/codegen/DOMJSClass.h => servo/src/components/script/dom/bindings/codegen/DOMJSClass.h rename : servo/src/components/main/dom/bindings/codegen/DOMJSProxyHandler.cpp => servo/src/components/script/dom/bindings/codegen/DOMJSProxyHandler.cpp rename : servo/src/components/main/dom/bindings/codegen/DOMJSProxyHandler.h => servo/src/components/script/dom/bindings/codegen/DOMJSProxyHandler.h rename : servo/src/components/main/dom/bindings/codegen/DOMParser.webidl => servo/src/components/script/dom/bindings/codegen/DOMParser.webidl rename : servo/src/components/main/dom/bindings/codegen/ErrorResult.h => servo/src/components/script/dom/bindings/codegen/ErrorResult.h rename : servo/src/components/main/dom/bindings/codegen/Errors.msg => servo/src/components/script/dom/bindings/codegen/Errors.msg rename : servo/src/components/main/dom/bindings/codegen/Event.webidl => servo/src/components/script/dom/bindings/codegen/Event.webidl rename : servo/src/components/main/dom/bindings/codegen/EventTarget.webidl => servo/src/components/script/dom/bindings/codegen/EventTarget.webidl rename : servo/src/components/main/dom/bindings/codegen/GenerateCSS2PropertiesWebIDL.py => servo/src/components/script/dom/bindings/codegen/GenerateCSS2PropertiesWebIDL.py rename : servo/src/components/main/dom/bindings/codegen/GlobalGen.py => servo/src/components/script/dom/bindings/codegen/GlobalGen.py rename : servo/src/components/main/dom/bindings/codegen/HTMLCollection.webidl => servo/src/components/script/dom/bindings/codegen/HTMLCollection.webidl rename : servo/src/components/main/dom/bindings/codegen/Makefile.in => servo/src/components/script/dom/bindings/codegen/Makefile.in rename : servo/src/components/main/dom/bindings/codegen/Nullable.h => servo/src/components/script/dom/bindings/codegen/Nullable.h rename : servo/src/components/main/dom/bindings/codegen/PrimitiveConversions.h => servo/src/components/script/dom/bindings/codegen/PrimitiveConversions.h rename : servo/src/components/main/dom/bindings/codegen/RegisterBindings.cpp => servo/src/components/script/dom/bindings/codegen/RegisterBindings.cpp rename : servo/src/components/main/dom/bindings/codegen/RegisterBindings.h => servo/src/components/script/dom/bindings/codegen/RegisterBindings.h rename : servo/src/components/main/dom/bindings/codegen/TypedArray.h => servo/src/components/script/dom/bindings/codegen/TypedArray.h rename : servo/src/components/main/dom/bindings/codegen/crashtests/769464.html => servo/src/components/script/dom/bindings/codegen/crashtests/769464.html rename : servo/src/components/main/dom/bindings/codegen/crashtests/crashtests.list => servo/src/components/script/dom/bindings/codegen/crashtests/crashtests.list rename : servo/src/components/main/dom/bindings/codegen/parser/README => servo/src/components/script/dom/bindings/codegen/parser/README rename : servo/src/components/main/dom/bindings/codegen/parser/UPSTREAM => servo/src/components/script/dom/bindings/codegen/parser/UPSTREAM rename : servo/src/components/main/dom/bindings/codegen/parser/WebIDL.py => servo/src/components/script/dom/bindings/codegen/parser/WebIDL.py rename : servo/src/components/main/dom/bindings/codegen/parser/runtests.py => servo/src/components/script/dom/bindings/codegen/parser/runtests.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_any_null.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_any_null.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_argument_identifier_conflicts.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_argument_identifier_conflicts.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_argument_novoid.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_argument_novoid.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_array_of_interface.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_array_of_interface.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_arraybuffer.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_arraybuffer.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_attr.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_attr.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_attr_sequence_type.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_attr_sequence_type.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_builtin_filename.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_builtin_filename.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_builtins.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_builtins.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_callback.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_callback.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_callback_interface.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_callback_interface.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_const.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_const.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_constructor.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_constructor.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_constructor_no_interface_object.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_constructor_no_interface_object.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_deduplicate.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_deduplicate.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_dictionary.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_dictionary.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_distinguishability.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_distinguishability.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_double_null.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_double_null.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_duplicate_qualifiers.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_duplicate_qualifiers.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_empty_enum.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_empty_enum.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_enum.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_enum.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_enum_duplicate_values.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_enum_duplicate_values.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_error_colno.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_error_colno.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_error_lineno.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_error_lineno.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_extended_attributes.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_extended_attributes.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_forward_decl.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_forward_decl.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_implements.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_implements.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_incomplete_parent.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_incomplete_parent.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_incomplete_types.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_incomplete_types.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_interface.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_interface.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_interface_const_identifier_conflicts.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_interface_const_identifier_conflicts.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_interface_identifier_conflicts_across_members.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_interface_identifier_conflicts_across_members.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_method.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_method.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_nullable_equivalency.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_nullable_equivalency.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_nullable_void.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_nullable_void.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_optional_constraints.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_optional_constraints.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_overload.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_overload.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_sanity.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_sanity.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_special_method_signature_mismatch.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_special_method_signature_mismatch.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_special_methods.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_special_methods.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_special_methods_uniqueness.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_special_methods_uniqueness.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_treatNonCallableAsNull.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_treatNonCallableAsNull.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_typedef.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_typedef.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_union.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_union.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_union_any.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_union_any.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_union_nullable.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_union_nullable.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_variadic_callback.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_variadic_callback.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_variadic_constraints.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_variadic_constraints.py rename : servo/src/components/main/dom/bindings/codegen/ply/COPYING => servo/src/components/script/dom/bindings/codegen/ply/COPYING rename : servo/src/components/main/dom/bindings/codegen/ply/README => servo/src/components/script/dom/bindings/codegen/ply/README rename : servo/src/components/main/dom/bindings/codegen/ply/ply/__init__.py => servo/src/components/script/dom/bindings/codegen/ply/ply/__init__.py rename : servo/src/components/main/dom/bindings/codegen/ply/ply/lex.py => servo/src/components/script/dom/bindings/codegen/ply/ply/lex.py rename : servo/src/components/main/dom/bindings/codegen/ply/ply/yacc.py => servo/src/components/script/dom/bindings/codegen/ply/ply/yacc.py rename : servo/src/components/main/dom/bindings/codegen/pythonpath.py => servo/src/components/script/dom/bindings/codegen/pythonpath.py rename : servo/src/components/main/dom/bindings/codegen/stubgenerator/Skeleton.cpp => servo/src/components/script/dom/bindings/codegen/stubgenerator/Skeleton.cpp rename : servo/src/components/main/dom/bindings/codegen/stubgenerator/Skeleton.h => servo/src/components/script/dom/bindings/codegen/stubgenerator/Skeleton.h rename : servo/src/components/main/dom/bindings/codegen/stubgenerator/generate.sh => servo/src/components/script/dom/bindings/codegen/stubgenerator/generate.sh rename : servo/src/components/main/dom/bindings/codegen/test/Makefile.in => servo/src/components/script/dom/bindings/codegen/test/Makefile.in rename : servo/src/components/main/dom/bindings/codegen/test/TestBindingHeader.h => servo/src/components/script/dom/bindings/codegen/test/TestBindingHeader.h rename : servo/src/components/main/dom/bindings/codegen/test/TestCodeGen.webidl => servo/src/components/script/dom/bindings/codegen/test/TestCodeGen.webidl rename : servo/src/components/main/dom/bindings/codegen/test/TestDictionary.webidl => servo/src/components/script/dom/bindings/codegen/test/TestDictionary.webidl rename : servo/src/components/main/dom/bindings/codegen/test/TestTypedef.webidl => servo/src/components/script/dom/bindings/codegen/test/TestTypedef.webidl rename : servo/src/components/main/dom/bindings/codegen/test/file_bug775543.html => servo/src/components/script/dom/bindings/codegen/test/file_bug775543.html rename : servo/src/components/main/dom/bindings/codegen/test/forOf_iframe.html => servo/src/components/script/dom/bindings/codegen/test/forOf_iframe.html rename : servo/src/components/main/dom/bindings/codegen/test/test_InstanceOf.html => servo/src/components/script/dom/bindings/codegen/test/test_InstanceOf.html rename : servo/src/components/main/dom/bindings/codegen/test/test_bug773326.html => servo/src/components/script/dom/bindings/codegen/test/test_bug773326.html rename : servo/src/components/main/dom/bindings/codegen/test/test_bug775543.html => servo/src/components/script/dom/bindings/codegen/test/test_bug775543.html rename : servo/src/components/main/dom/bindings/codegen/test/test_bug788369.html => servo/src/components/script/dom/bindings/codegen/test/test_bug788369.html rename : servo/src/components/main/dom/bindings/codegen/test/test_enums.html => servo/src/components/script/dom/bindings/codegen/test/test_enums.html rename : servo/src/components/main/dom/bindings/codegen/test/test_forOf.html => servo/src/components/script/dom/bindings/codegen/test/test_forOf.html rename : servo/src/components/main/dom/bindings/codegen/test/test_integers.html => servo/src/components/script/dom/bindings/codegen/test/test_integers.html rename : servo/src/components/main/dom/bindings/codegen/test/test_interfaceToString.html => servo/src/components/script/dom/bindings/codegen/test/test_interfaceToString.html rename : servo/src/components/main/dom/bindings/codegen/test/test_lookupGetter.html => servo/src/components/script/dom/bindings/codegen/test/test_lookupGetter.html rename : servo/src/components/main/dom/bindings/codegen/test/test_sequence_wrapping.html => servo/src/components/script/dom/bindings/codegen/test/test_sequence_wrapping.html rename : servo/src/components/main/dom/bindings/codegen/test/test_traceProtos.html => servo/src/components/script/dom/bindings/codegen/test/test_traceProtos.html rename : servo/src/components/main/dom/bindings/conversions.rs => servo/src/components/script/dom/bindings/conversions.rs rename : servo/src/components/main/dom/bindings/document.rs => servo/src/components/script/dom/bindings/document.rs rename : servo/src/components/main/dom/bindings/domparser.rs => servo/src/components/script/dom/bindings/domparser.rs rename : servo/src/components/main/dom/bindings/element.rs => servo/src/components/script/dom/bindings/element.rs rename : servo/src/components/main/dom/bindings/event.rs => servo/src/components/script/dom/bindings/event.rs rename : servo/src/components/main/dom/bindings/eventtarget.rs => servo/src/components/script/dom/bindings/eventtarget.rs rename : servo/src/components/main/dom/bindings/htmlcollection.rs => servo/src/components/script/dom/bindings/htmlcollection.rs rename : servo/src/components/main/dom/bindings/node.rs => servo/src/components/script/dom/bindings/node.rs rename : servo/src/components/main/dom/bindings/proxyhandler.rs => servo/src/components/script/dom/bindings/proxyhandler.rs rename : servo/src/components/main/dom/bindings/text.rs => servo/src/components/script/dom/bindings/text.rs rename : servo/src/components/main/dom/bindings/utils.rs => servo/src/components/script/dom/bindings/utils.rs rename : servo/src/components/main/dom/bindings/window.rs => servo/src/components/script/dom/bindings/window.rs rename : servo/src/components/main/dom/characterdata.rs => servo/src/components/script/dom/characterdata.rs rename : servo/src/components/main/dom/clientrect.rs => servo/src/components/script/dom/clientrect.rs rename : servo/src/components/main/dom/clientrectlist.rs => servo/src/components/script/dom/clientrectlist.rs rename : servo/src/components/main/dom/document.rs => servo/src/components/script/dom/document.rs rename : servo/src/components/main/dom/domparser.rs => servo/src/components/script/dom/domparser.rs rename : servo/src/components/main/dom/element.rs => servo/src/components/script/dom/element.rs rename : servo/src/components/main/dom/event.rs => servo/src/components/script/dom/event.rs rename : servo/src/components/main/dom/eventtarget.rs => servo/src/components/script/dom/eventtarget.rs rename : servo/src/components/main/dom/htmlcollection.rs => servo/src/components/script/dom/htmlcollection.rs rename : servo/src/components/main/dom/node.rs => servo/src/components/script/dom/node.rs rename : servo/src/components/main/dom/window.rs => servo/src/components/script/dom/window.rs rename : servo/src/components/main/html/cssparse.rs => servo/src/components/script/html/cssparse.rs rename : servo/src/components/main/html/hubbub_html_parser.rs => servo/src/components/script/html/hubbub_html_parser.rs rename : servo/src/components/main/scripting/script_task.rs => servo/src/components/script/script_task.rs
2013-05-30 07:06:42 +00:00
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#![feature(box_syntax)]
#![feature(conservative_impl_trait)]
#![feature(const_fn)]
#![feature(core_intrinsics)]
#![feature(custom_attribute)]
#![feature(custom_derive)]
#![feature(fnbox)]
#![feature(mpsc_select)]
#![feature(nonzero)]
#![feature(on_unimplemented)]
#![feature(optin_builtin_traits)]
#![feature(plugin)]
#![feature(slice_patterns)]
#![feature(stmt_expr_attributes)]
#![feature(try_from)]
#![feature(untagged_unions)]
#![deny(unsafe_code)]
#![allow(non_snake_case)]
#![doc = "The script crate contains all matters DOM."]
#![plugin(heapsize_plugin)]
#![plugin(phf_macros)]
#![plugin(plugins)]
extern crate angle;
extern crate app_units;
extern crate audio_video_metadata;
#[allow(unused_extern_crates)]
#[macro_use]
extern crate bitflags;
extern crate canvas_traits;
extern crate caseless;
extern crate cookie as cookie_rs;
extern crate core;
#[macro_use]
extern crate cssparser;
extern crate devtools_traits;
extern crate encoding;
extern crate euclid;
extern crate fnv;
extern crate gfx_traits;
extern crate heapsize;
extern crate html5ever;
extern crate hyper;
extern crate hyper_serde;
extern crate image;
extern crate ipc_channel;
servo: Merge #11872 - Replace return_address usage for rooting with stack guards and convenience macros (from eddyb:back-to-roots); r=Ms2ger The existing `Rooted` and `RootedVec` users were migrated the the following two macros: ```rust let x = Rooted::new(cx, value); // Was changed to: rooted!(in(cx) let x = value); // Which expands to: let mut __root = Rooted::new_unrooted(value); let x = RootedGuard::new(cx, &mut __root); ``` ```rust let mut v = RootedVec::new(); v.extend(iterator); // Was changed to: rooted_vec!(let v <- iterator); // Which expands to: let mut __root = RootableVec::new(); let v = RootedVec::new(&mut __root, iterator); ``` The `rooted!` macro depends on servo/rust-mozjs#272. These APIs based on two types, a container to be rooted and a rooting guard, allow implementing both `Rooted`-style rooting and `Traceable`-based rooting in stable Rust, without abusing `return_address`. Such macros may have been tried before, but in 1.9 their hygiene is broken, they work only since 1.10. Sadly, `Rooted` is a FFI type and completely exposed, so I cannot prevent anyone from creating their own, although all fields but the value get overwritten by `RootedGuard::new` anyway. `RootableVec` OTOH is *guaranteed* to be empty when not rooted, which makes it harmless AFAICT. By fixing rust-lang/rust#34227, this PR enables Servo to build with `-Zorbit`. --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix rust-lang/rust#34227 - [x] These changes do not require tests because they are not functional changes Source-Repo: https://github.com/servo/servo Source-Revision: 80cb0cf8214fd52d2884724614c40cb278ee7575
2016-07-04 18:03:35 +00:00
#[macro_use]
extern crate js;
extern crate libc;
#[macro_use]
extern crate log;
#[macro_use]
extern crate mime;
extern crate mime_guess;
extern crate msg;
extern crate net_traits;
extern crate num_traits;
extern crate offscreen_gl_context;
extern crate open;
extern crate parking_lot;
extern crate phf;
#[macro_use]
extern crate profile_traits;
extern crate rand;
extern crate range;
extern crate ref_slice;
extern crate regex;
extern crate rustc_serialize;
extern crate script_layout_interface;
extern crate script_traits;
extern crate selectors;
extern crate serde;
extern crate smallvec;
#[macro_use(atom, ns)] extern crate string_cache;
#[macro_use]
extern crate style;
extern crate style_traits;
extern crate time;
#[cfg(any(target_os = "macos", target_os = "linux", target_os = "windows"))]
extern crate tinyfiledialogs;
extern crate url;
#[macro_use]
extern crate util;
extern crate uuid;
extern crate webrender_traits;
extern crate websocket;
extern crate xml5ever;
servo: Merge #474 - Separate the DOM and layout into separate crates (from pcwalton:separation); r=pcwalton r? @metajack Source-Repo: https://github.com/servo/servo Source-Revision: 473b0941eca8c6498e5065892de49562dce0b78c --HG-- rename : servo/src/components/main/dom/bindings/clientrect.rs => servo/src/components/script/dom/bindings/clientrect.rs rename : servo/src/components/main/dom/bindings/clientrectlist.rs => servo/src/components/script/dom/bindings/clientrectlist.rs rename : servo/src/components/main/dom/bindings/codegen/BindingGen.py => servo/src/components/script/dom/bindings/codegen/BindingGen.py rename : servo/src/components/main/dom/bindings/codegen/BindingUtils.cpp => servo/src/components/script/dom/bindings/codegen/BindingUtils.cpp rename : servo/src/components/main/dom/bindings/codegen/BindingUtils.h => servo/src/components/script/dom/bindings/codegen/BindingUtils.h rename : servo/src/components/main/dom/bindings/codegen/Bindings.conf => servo/src/components/script/dom/bindings/codegen/Bindings.conf rename : servo/src/components/main/dom/bindings/codegen/ClientRect.webidl => servo/src/components/script/dom/bindings/codegen/ClientRect.webidl rename : servo/src/components/main/dom/bindings/codegen/ClientRectList.webidl => servo/src/components/script/dom/bindings/codegen/ClientRectList.webidl rename : servo/src/components/main/dom/bindings/codegen/Codegen.py => servo/src/components/script/dom/bindings/codegen/Codegen.py rename : servo/src/components/main/dom/bindings/codegen/CodegenRust.py => servo/src/components/script/dom/bindings/codegen/CodegenRust.py rename : servo/src/components/main/dom/bindings/codegen/Configuration.py => servo/src/components/script/dom/bindings/codegen/Configuration.py rename : servo/src/components/main/dom/bindings/codegen/DOMJSClass.h => servo/src/components/script/dom/bindings/codegen/DOMJSClass.h rename : servo/src/components/main/dom/bindings/codegen/DOMJSProxyHandler.cpp => servo/src/components/script/dom/bindings/codegen/DOMJSProxyHandler.cpp rename : servo/src/components/main/dom/bindings/codegen/DOMJSProxyHandler.h => servo/src/components/script/dom/bindings/codegen/DOMJSProxyHandler.h rename : servo/src/components/main/dom/bindings/codegen/DOMParser.webidl => servo/src/components/script/dom/bindings/codegen/DOMParser.webidl rename : servo/src/components/main/dom/bindings/codegen/ErrorResult.h => servo/src/components/script/dom/bindings/codegen/ErrorResult.h rename : servo/src/components/main/dom/bindings/codegen/Errors.msg => servo/src/components/script/dom/bindings/codegen/Errors.msg rename : servo/src/components/main/dom/bindings/codegen/Event.webidl => servo/src/components/script/dom/bindings/codegen/Event.webidl rename : servo/src/components/main/dom/bindings/codegen/EventTarget.webidl => servo/src/components/script/dom/bindings/codegen/EventTarget.webidl rename : servo/src/components/main/dom/bindings/codegen/GenerateCSS2PropertiesWebIDL.py => servo/src/components/script/dom/bindings/codegen/GenerateCSS2PropertiesWebIDL.py rename : servo/src/components/main/dom/bindings/codegen/GlobalGen.py => servo/src/components/script/dom/bindings/codegen/GlobalGen.py rename : servo/src/components/main/dom/bindings/codegen/HTMLCollection.webidl => servo/src/components/script/dom/bindings/codegen/HTMLCollection.webidl rename : servo/src/components/main/dom/bindings/codegen/Makefile.in => servo/src/components/script/dom/bindings/codegen/Makefile.in rename : servo/src/components/main/dom/bindings/codegen/Nullable.h => servo/src/components/script/dom/bindings/codegen/Nullable.h rename : servo/src/components/main/dom/bindings/codegen/PrimitiveConversions.h => servo/src/components/script/dom/bindings/codegen/PrimitiveConversions.h rename : servo/src/components/main/dom/bindings/codegen/RegisterBindings.cpp => servo/src/components/script/dom/bindings/codegen/RegisterBindings.cpp rename : servo/src/components/main/dom/bindings/codegen/RegisterBindings.h => servo/src/components/script/dom/bindings/codegen/RegisterBindings.h rename : servo/src/components/main/dom/bindings/codegen/TypedArray.h => servo/src/components/script/dom/bindings/codegen/TypedArray.h rename : servo/src/components/main/dom/bindings/codegen/crashtests/769464.html => servo/src/components/script/dom/bindings/codegen/crashtests/769464.html rename : servo/src/components/main/dom/bindings/codegen/crashtests/crashtests.list => servo/src/components/script/dom/bindings/codegen/crashtests/crashtests.list rename : servo/src/components/main/dom/bindings/codegen/parser/README => servo/src/components/script/dom/bindings/codegen/parser/README rename : servo/src/components/main/dom/bindings/codegen/parser/UPSTREAM => servo/src/components/script/dom/bindings/codegen/parser/UPSTREAM rename : servo/src/components/main/dom/bindings/codegen/parser/WebIDL.py => servo/src/components/script/dom/bindings/codegen/parser/WebIDL.py rename : servo/src/components/main/dom/bindings/codegen/parser/runtests.py => servo/src/components/script/dom/bindings/codegen/parser/runtests.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_any_null.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_any_null.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_argument_identifier_conflicts.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_argument_identifier_conflicts.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_argument_novoid.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_argument_novoid.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_array_of_interface.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_array_of_interface.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_arraybuffer.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_arraybuffer.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_attr.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_attr.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_attr_sequence_type.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_attr_sequence_type.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_builtin_filename.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_builtin_filename.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_builtins.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_builtins.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_callback.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_callback.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_callback_interface.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_callback_interface.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_const.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_const.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_constructor.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_constructor.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_constructor_no_interface_object.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_constructor_no_interface_object.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_deduplicate.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_deduplicate.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_dictionary.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_dictionary.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_distinguishability.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_distinguishability.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_double_null.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_double_null.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_duplicate_qualifiers.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_duplicate_qualifiers.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_empty_enum.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_empty_enum.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_enum.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_enum.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_enum_duplicate_values.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_enum_duplicate_values.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_error_colno.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_error_colno.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_error_lineno.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_error_lineno.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_extended_attributes.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_extended_attributes.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_forward_decl.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_forward_decl.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_implements.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_implements.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_incomplete_parent.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_incomplete_parent.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_incomplete_types.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_incomplete_types.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_interface.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_interface.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_interface_const_identifier_conflicts.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_interface_const_identifier_conflicts.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_interface_identifier_conflicts_across_members.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_interface_identifier_conflicts_across_members.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_method.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_method.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_nullable_equivalency.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_nullable_equivalency.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_nullable_void.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_nullable_void.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_optional_constraints.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_optional_constraints.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_overload.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_overload.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_sanity.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_sanity.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_special_method_signature_mismatch.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_special_method_signature_mismatch.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_special_methods.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_special_methods.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_special_methods_uniqueness.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_special_methods_uniqueness.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_treatNonCallableAsNull.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_treatNonCallableAsNull.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_typedef.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_typedef.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_union.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_union.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_union_any.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_union_any.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_union_nullable.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_union_nullable.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_variadic_callback.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_variadic_callback.py rename : servo/src/components/main/dom/bindings/codegen/parser/tests/test_variadic_constraints.py => servo/src/components/script/dom/bindings/codegen/parser/tests/test_variadic_constraints.py rename : servo/src/components/main/dom/bindings/codegen/ply/COPYING => servo/src/components/script/dom/bindings/codegen/ply/COPYING rename : servo/src/components/main/dom/bindings/codegen/ply/README => servo/src/components/script/dom/bindings/codegen/ply/README rename : servo/src/components/main/dom/bindings/codegen/ply/ply/__init__.py => servo/src/components/script/dom/bindings/codegen/ply/ply/__init__.py rename : servo/src/components/main/dom/bindings/codegen/ply/ply/lex.py => servo/src/components/script/dom/bindings/codegen/ply/ply/lex.py rename : servo/src/components/main/dom/bindings/codegen/ply/ply/yacc.py => servo/src/components/script/dom/bindings/codegen/ply/ply/yacc.py rename : servo/src/components/main/dom/bindings/codegen/pythonpath.py => servo/src/components/script/dom/bindings/codegen/pythonpath.py rename : servo/src/components/main/dom/bindings/codegen/stubgenerator/Skeleton.cpp => servo/src/components/script/dom/bindings/codegen/stubgenerator/Skeleton.cpp rename : servo/src/components/main/dom/bindings/codegen/stubgenerator/Skeleton.h => servo/src/components/script/dom/bindings/codegen/stubgenerator/Skeleton.h rename : servo/src/components/main/dom/bindings/codegen/stubgenerator/generate.sh => servo/src/components/script/dom/bindings/codegen/stubgenerator/generate.sh rename : servo/src/components/main/dom/bindings/codegen/test/Makefile.in => servo/src/components/script/dom/bindings/codegen/test/Makefile.in rename : servo/src/components/main/dom/bindings/codegen/test/TestBindingHeader.h => servo/src/components/script/dom/bindings/codegen/test/TestBindingHeader.h rename : servo/src/components/main/dom/bindings/codegen/test/TestCodeGen.webidl => servo/src/components/script/dom/bindings/codegen/test/TestCodeGen.webidl rename : servo/src/components/main/dom/bindings/codegen/test/TestDictionary.webidl => servo/src/components/script/dom/bindings/codegen/test/TestDictionary.webidl rename : servo/src/components/main/dom/bindings/codegen/test/TestTypedef.webidl => servo/src/components/script/dom/bindings/codegen/test/TestTypedef.webidl rename : servo/src/components/main/dom/bindings/codegen/test/file_bug775543.html => servo/src/components/script/dom/bindings/codegen/test/file_bug775543.html rename : servo/src/components/main/dom/bindings/codegen/test/forOf_iframe.html => servo/src/components/script/dom/bindings/codegen/test/forOf_iframe.html rename : servo/src/components/main/dom/bindings/codegen/test/test_InstanceOf.html => servo/src/components/script/dom/bindings/codegen/test/test_InstanceOf.html rename : servo/src/components/main/dom/bindings/codegen/test/test_bug773326.html => servo/src/components/script/dom/bindings/codegen/test/test_bug773326.html rename : servo/src/components/main/dom/bindings/codegen/test/test_bug775543.html => servo/src/components/script/dom/bindings/codegen/test/test_bug775543.html rename : servo/src/components/main/dom/bindings/codegen/test/test_bug788369.html => servo/src/components/script/dom/bindings/codegen/test/test_bug788369.html rename : servo/src/components/main/dom/bindings/codegen/test/test_enums.html => servo/src/components/script/dom/bindings/codegen/test/test_enums.html rename : servo/src/components/main/dom/bindings/codegen/test/test_forOf.html => servo/src/components/script/dom/bindings/codegen/test/test_forOf.html rename : servo/src/components/main/dom/bindings/codegen/test/test_integers.html => servo/src/components/script/dom/bindings/codegen/test/test_integers.html rename : servo/src/components/main/dom/bindings/codegen/test/test_interfaceToString.html => servo/src/components/script/dom/bindings/codegen/test/test_interfaceToString.html rename : servo/src/components/main/dom/bindings/codegen/test/test_lookupGetter.html => servo/src/components/script/dom/bindings/codegen/test/test_lookupGetter.html rename : servo/src/components/main/dom/bindings/codegen/test/test_sequence_wrapping.html => servo/src/components/script/dom/bindings/codegen/test/test_sequence_wrapping.html rename : servo/src/components/main/dom/bindings/codegen/test/test_traceProtos.html => servo/src/components/script/dom/bindings/codegen/test/test_traceProtos.html rename : servo/src/components/main/dom/bindings/conversions.rs => servo/src/components/script/dom/bindings/conversions.rs rename : servo/src/components/main/dom/bindings/document.rs => servo/src/components/script/dom/bindings/document.rs rename : servo/src/components/main/dom/bindings/domparser.rs => servo/src/components/script/dom/bindings/domparser.rs rename : servo/src/components/main/dom/bindings/element.rs => servo/src/components/script/dom/bindings/element.rs rename : servo/src/components/main/dom/bindings/event.rs => servo/src/components/script/dom/bindings/event.rs rename : servo/src/components/main/dom/bindings/eventtarget.rs => servo/src/components/script/dom/bindings/eventtarget.rs rename : servo/src/components/main/dom/bindings/htmlcollection.rs => servo/src/components/script/dom/bindings/htmlcollection.rs rename : servo/src/components/main/dom/bindings/node.rs => servo/src/components/script/dom/bindings/node.rs rename : servo/src/components/main/dom/bindings/proxyhandler.rs => servo/src/components/script/dom/bindings/proxyhandler.rs rename : servo/src/components/main/dom/bindings/text.rs => servo/src/components/script/dom/bindings/text.rs rename : servo/src/components/main/dom/bindings/utils.rs => servo/src/components/script/dom/bindings/utils.rs rename : servo/src/components/main/dom/bindings/window.rs => servo/src/components/script/dom/bindings/window.rs rename : servo/src/components/main/dom/characterdata.rs => servo/src/components/script/dom/characterdata.rs rename : servo/src/components/main/dom/clientrect.rs => servo/src/components/script/dom/clientrect.rs rename : servo/src/components/main/dom/clientrectlist.rs => servo/src/components/script/dom/clientrectlist.rs rename : servo/src/components/main/dom/document.rs => servo/src/components/script/dom/document.rs rename : servo/src/components/main/dom/domparser.rs => servo/src/components/script/dom/domparser.rs rename : servo/src/components/main/dom/element.rs => servo/src/components/script/dom/element.rs rename : servo/src/components/main/dom/event.rs => servo/src/components/script/dom/event.rs rename : servo/src/components/main/dom/eventtarget.rs => servo/src/components/script/dom/eventtarget.rs rename : servo/src/components/main/dom/htmlcollection.rs => servo/src/components/script/dom/htmlcollection.rs rename : servo/src/components/main/dom/node.rs => servo/src/components/script/dom/node.rs rename : servo/src/components/main/dom/window.rs => servo/src/components/script/dom/window.rs rename : servo/src/components/main/html/cssparse.rs => servo/src/components/script/html/cssparse.rs rename : servo/src/components/main/html/hubbub_html_parser.rs => servo/src/components/script/html/hubbub_html_parser.rs rename : servo/src/components/main/scripting/script_task.rs => servo/src/components/script/script_task.rs
2013-05-30 07:06:42 +00:00
pub mod bluetooth_blacklist;
mod body;
pub mod clipboard_provider;
mod devtools;
pub mod document_loader;
#[macro_use]
pub mod dom;
servo: Merge #13323 - Implement the Fetch method (from jeenalee:fetch); r=jdm <!-- Please describe your changes on the following line: --> This PR implements the fetch method, which is described in [the Fetch Spec](https://fetch.spec.whatwg.org/#fetch-method). The expected wpt results are updated as well. A few comments about the current fetch implementation: - The fetch method manually calls `JSAutoCompartment` in order to prevent SpiderMonkey from crashing. This may have to change in the future. - Not all `FetchResponseListener` methods are implemented. - `net_traits::CoreResourceMsg::Fetch` message takes a `net_traits::request::RequestInit`. However, when the fetch method is called, a `RequestBinding::RequestInit` is given. The fetch method constructs a `dom::request::Request` with the given `RequestInit`, then creates `net_traits::request::RequestInit` from the dom Request object for the fetch message. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #11898 (github issue number if applicable). <!-- Either: --> - [X] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> Source-Repo: https://github.com/servo/servo Source-Revision: 5996e008a34dd92602acb7bbd3ea41a880053110
2016-09-29 19:28:54 +00:00
pub mod fetch;
pub mod layout_wrapper;
mod mem;
mod network_listener;
pub mod origin;
pub mod script_runtime;
#[allow(unsafe_code)]
servo: Merge #9201 - task -> thread (from ajnirp:8512-task-thread); r=jdm for #8512 Source-Repo: https://github.com/servo/servo Source-Revision: d3e2f94f2024f4735f836588ed11303a0abafdf8 --HG-- rename : servo/components/canvas/canvas_paint_task.rs => servo/components/canvas/canvas_paint_thread.rs rename : servo/components/canvas/webgl_paint_task.rs => servo/components/canvas/webgl_paint_thread.rs rename : servo/components/compositing/compositor_task.rs => servo/components/compositing/compositor_thread.rs rename : servo/components/gfx/font_cache_task.rs => servo/components/gfx/font_cache_thread.rs rename : servo/components/gfx/paint_task.rs => servo/components/gfx/paint_thread.rs rename : servo/components/layout/layout_task.rs => servo/components/layout/layout_thread.rs rename : servo/components/net/image_cache_task.rs => servo/components/net/image_cache_thread.rs rename : servo/components/net/resource_task.rs => servo/components/net/resource_thread.rs rename : servo/components/net/storage_task.rs => servo/components/net/storage_thread.rs rename : servo/components/net_traits/image_cache_task.rs => servo/components/net_traits/image_cache_thread.rs rename : servo/components/net_traits/storage_task.rs => servo/components/net_traits/storage_thread.rs rename : servo/components/script/script_task.rs => servo/components/script/script_thread.rs rename : servo/components/util/task.rs => servo/components/util/thread.rs rename : servo/tests/unit/gfx/font_cache_task.rs => servo/tests/unit/gfx/font_cache_thread.rs rename : servo/tests/unit/net/resource_task.rs => servo/tests/unit/net/resource_thread.rs rename : servo/tests/unit/util/task.rs => servo/tests/unit/util/thread.rs
2016-01-10 10:19:04 +00:00
pub mod script_thread;
servo: Merge #11727 - Integrate service worker manager thread (from creativcoder:swmanager); r=jdm <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes are part of #11091 <!-- Either: --> - [X] There are tests for these changes at my [gh-pages](https://github.com/creativcoder/gsoc16/tree/gh-pages) branch to test the instantiation of service workers by their manager, but will need to discuss how that would integrate into master. Changes: - Introduces a `ServiceWorkerManager`, which maintains an map of registered service workers as well as a map of active workers keyed by their `scope_url`. - Adds the initialization of ServiceWorkerManager, at the `script::init()`, which makes it available as a single entity listening for requests from different script threads. - Adds a timeout thread in `serviceworkerglobalscope`, which terminates the workers, after a timeout of 60 secs, thereby removing it from the active workers list. - Adds the matching of scope urls, in longest prefix way rather than path structural way, according to [spec](https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#scope-match-algorithm). - Make ServiceWorkerManager, the holder of network sender, instead of script thread, so it can send `CustomResponse`. <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> Source-Repo: https://github.com/servo/servo Source-Revision: 513811f6b40d522bc425c2588320b889614f2973
2016-07-18 16:50:59 +00:00
mod serviceworker_manager;
mod task_source;
pub mod textinput;
mod timers;
mod unpremultiplytable;
mod webdriver_handlers;
servo: Merge #6150 - Upgrade to Spidermonkey 39 (from servo:smupgrade3); r=mbrubeck > Here it is. > > ~~There's two major things that are unfinished here:~~ > - ~~Dealing with the unroot_must_root lint. I'm not sure about the value of this lint with the new rooting API.~~ Done. > - ~~Updating the Cargo.locks to point to the new SM and SM binding.~~ Done. > > I also included my fixes for the rust update, but these will disappear in a rebase. A rust update is necessary to support calling `Drop` on `Heap<T>` correctly when `Heap<T>` is inside a `Rc<T>`. Otherwise `&self` points to the wrong location. > > Incremental GC is disabled here. I'm not sure how to deal with the incremental barriers so that's left for later. > > Generational GC works. SM doesn't work without it. > > The biggest change here is to the rooting API. `Root` was made movable, and `Temporary` and `JSRef` was removed. Movable `Root`s means there's no need for `Temporary`, and `JSRef`s aren't needed generally since it can be assumed that being able to obtain a reference to a dom object means it's already rooted. References have their lifetime bound to the Roots that provided them. DOM objects that haven't passed through `reflect_dom_object` don't need to be rooted, and DOM objects that have passed through `reflect_dom_object` can't be obtained without being rooted through `native_from_reflector_jsmanaged` or `JS::<T>::root()`. > > Support for `Heap<T>` ended up messier than I expected. It's split into two commits, but only because it's a bit difficult to fold them together. Supporting `Heap<T>` properly requires that that `Heap::<T>::set()` be called on something that won't move. I removed the Copy and Clone trait from `Heap<T>` so `Cell` can't hold `Heap<T>` - only `UnsafeCell` can hold it. > > `CallbackObject` is a bit tricky - I moved all callbacks into `Rc<T>` in order to make sure that the pointer inside to a `*mut JSObject` doesn't move. This is necessary for supporting `Heap<T>`. > > `RootedCollectionSet` is very general purpose now. Anything with `JSTraceable` can be rooted by `RootedCollectionSet`/`RootedTraceable`. Right now, `RootedTraceable` is only used to hold down dom objects before they're fully attached to their reflector. I had to make a custom mechanism to dispatch the trace call - couldn't figure out how to get trait objects working for this case. > > This has been tested with the following zeal settings: > > GC after every allocation > JS_GC_ZEAL=2,1 > > GC after every 100 allocations (important for catching use-after-free bugs) > JS_GC_ZEAL=2,100 > > Verify pre barriers > JS_GC_ZEAL=4,1 > > Verify post barriers > JS_GC_ZEAL=11,1 Source-Repo: https://github.com/servo/servo Source-Revision: e7808c526c348fea5e3b48af70b7f1a066652097
2015-06-19 22:46:55 +00:00
use dom::bindings::codegen::RegisterBindings;
use dom::bindings::proxyhandler;
servo: Merge #11727 - Integrate service worker manager thread (from creativcoder:swmanager); r=jdm <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes are part of #11091 <!-- Either: --> - [X] There are tests for these changes at my [gh-pages](https://github.com/creativcoder/gsoc16/tree/gh-pages) branch to test the instantiation of service workers by their manager, but will need to discuss how that would integrate into master. Changes: - Introduces a `ServiceWorkerManager`, which maintains an map of registered service workers as well as a map of active workers keyed by their `scope_url`. - Adds the initialization of ServiceWorkerManager, at the `script::init()`, which makes it available as a single entity listening for requests from different script threads. - Adds a timeout thread in `serviceworkerglobalscope`, which terminates the workers, after a timeout of 60 secs, thereby removing it from the active workers list. - Adds the matching of scope urls, in longest prefix way rather than path structural way, according to [spec](https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#scope-match-algorithm). - Make ServiceWorkerManager, the holder of network sender, instead of script thread, so it can send `CustomResponse`. <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> Source-Repo: https://github.com/servo/servo Source-Revision: 513811f6b40d522bc425c2588320b889614f2973
2016-07-18 16:50:59 +00:00
use script_traits::SWManagerSenders;
use serviceworker_manager::ServiceWorkerManager;
#[cfg(target_os = "linux")]
#[allow(unsafe_code)]
fn perform_platform_specific_initialization() {
use std::mem;
// 4096 is default max on many linux systems
const MAX_FILE_LIMIT: libc::rlim_t = 4096;
// Bump up our number of file descriptors to save us from impending doom caused by an onslaught
// of iframes.
unsafe {
let mut rlim: libc::rlimit = mem::uninitialized();
match libc::getrlimit(libc::RLIMIT_NOFILE, &mut rlim) {
0 => {
if rlim.rlim_cur >= MAX_FILE_LIMIT {
// we have more than enough
return;
}
rlim.rlim_cur = match rlim.rlim_max {
libc::RLIM_INFINITY => MAX_FILE_LIMIT,
_ => {
if rlim.rlim_max < MAX_FILE_LIMIT {
rlim.rlim_max
} else {
MAX_FILE_LIMIT
}
}
};
match libc::setrlimit(libc::RLIMIT_NOFILE, &rlim) {
0 => (),
_ => warn!("Failed to set file count limit"),
};
},
_ => warn!("Failed to get file count limit"),
};
}
}
#[cfg(not(target_os = "linux"))]
fn perform_platform_specific_initialization() {}
servo: Merge #6150 - Upgrade to Spidermonkey 39 (from servo:smupgrade3); r=mbrubeck > Here it is. > > ~~There's two major things that are unfinished here:~~ > - ~~Dealing with the unroot_must_root lint. I'm not sure about the value of this lint with the new rooting API.~~ Done. > - ~~Updating the Cargo.locks to point to the new SM and SM binding.~~ Done. > > I also included my fixes for the rust update, but these will disappear in a rebase. A rust update is necessary to support calling `Drop` on `Heap<T>` correctly when `Heap<T>` is inside a `Rc<T>`. Otherwise `&self` points to the wrong location. > > Incremental GC is disabled here. I'm not sure how to deal with the incremental barriers so that's left for later. > > Generational GC works. SM doesn't work without it. > > The biggest change here is to the rooting API. `Root` was made movable, and `Temporary` and `JSRef` was removed. Movable `Root`s means there's no need for `Temporary`, and `JSRef`s aren't needed generally since it can be assumed that being able to obtain a reference to a dom object means it's already rooted. References have their lifetime bound to the Roots that provided them. DOM objects that haven't passed through `reflect_dom_object` don't need to be rooted, and DOM objects that have passed through `reflect_dom_object` can't be obtained without being rooted through `native_from_reflector_jsmanaged` or `JS::<T>::root()`. > > Support for `Heap<T>` ended up messier than I expected. It's split into two commits, but only because it's a bit difficult to fold them together. Supporting `Heap<T>` properly requires that that `Heap::<T>::set()` be called on something that won't move. I removed the Copy and Clone trait from `Heap<T>` so `Cell` can't hold `Heap<T>` - only `UnsafeCell` can hold it. > > `CallbackObject` is a bit tricky - I moved all callbacks into `Rc<T>` in order to make sure that the pointer inside to a `*mut JSObject` doesn't move. This is necessary for supporting `Heap<T>`. > > `RootedCollectionSet` is very general purpose now. Anything with `JSTraceable` can be rooted by `RootedCollectionSet`/`RootedTraceable`. Right now, `RootedTraceable` is only used to hold down dom objects before they're fully attached to their reflector. I had to make a custom mechanism to dispatch the trace call - couldn't figure out how to get trait objects working for this case. > > This has been tested with the following zeal settings: > > GC after every allocation > JS_GC_ZEAL=2,1 > > GC after every 100 allocations (important for catching use-after-free bugs) > JS_GC_ZEAL=2,100 > > Verify pre barriers > JS_GC_ZEAL=4,1 > > Verify post barriers > JS_GC_ZEAL=11,1 Source-Repo: https://github.com/servo/servo Source-Revision: e7808c526c348fea5e3b48af70b7f1a066652097
2015-06-19 22:46:55 +00:00
#[allow(unsafe_code)]
servo: Merge #11727 - Integrate service worker manager thread (from creativcoder:swmanager); r=jdm <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes are part of #11091 <!-- Either: --> - [X] There are tests for these changes at my [gh-pages](https://github.com/creativcoder/gsoc16/tree/gh-pages) branch to test the instantiation of service workers by their manager, but will need to discuss how that would integrate into master. Changes: - Introduces a `ServiceWorkerManager`, which maintains an map of registered service workers as well as a map of active workers keyed by their `scope_url`. - Adds the initialization of ServiceWorkerManager, at the `script::init()`, which makes it available as a single entity listening for requests from different script threads. - Adds a timeout thread in `serviceworkerglobalscope`, which terminates the workers, after a timeout of 60 secs, thereby removing it from the active workers list. - Adds the matching of scope urls, in longest prefix way rather than path structural way, according to [spec](https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#scope-match-algorithm). - Make ServiceWorkerManager, the holder of network sender, instead of script thread, so it can send `CustomResponse`. <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> Source-Repo: https://github.com/servo/servo Source-Revision: 513811f6b40d522bc425c2588320b889614f2973
2016-07-18 16:50:59 +00:00
pub fn init(sw_senders: SWManagerSenders) {
servo: Merge #6150 - Upgrade to Spidermonkey 39 (from servo:smupgrade3); r=mbrubeck > Here it is. > > ~~There's two major things that are unfinished here:~~ > - ~~Dealing with the unroot_must_root lint. I'm not sure about the value of this lint with the new rooting API.~~ Done. > - ~~Updating the Cargo.locks to point to the new SM and SM binding.~~ Done. > > I also included my fixes for the rust update, but these will disappear in a rebase. A rust update is necessary to support calling `Drop` on `Heap<T>` correctly when `Heap<T>` is inside a `Rc<T>`. Otherwise `&self` points to the wrong location. > > Incremental GC is disabled here. I'm not sure how to deal with the incremental barriers so that's left for later. > > Generational GC works. SM doesn't work without it. > > The biggest change here is to the rooting API. `Root` was made movable, and `Temporary` and `JSRef` was removed. Movable `Root`s means there's no need for `Temporary`, and `JSRef`s aren't needed generally since it can be assumed that being able to obtain a reference to a dom object means it's already rooted. References have their lifetime bound to the Roots that provided them. DOM objects that haven't passed through `reflect_dom_object` don't need to be rooted, and DOM objects that have passed through `reflect_dom_object` can't be obtained without being rooted through `native_from_reflector_jsmanaged` or `JS::<T>::root()`. > > Support for `Heap<T>` ended up messier than I expected. It's split into two commits, but only because it's a bit difficult to fold them together. Supporting `Heap<T>` properly requires that that `Heap::<T>::set()` be called on something that won't move. I removed the Copy and Clone trait from `Heap<T>` so `Cell` can't hold `Heap<T>` - only `UnsafeCell` can hold it. > > `CallbackObject` is a bit tricky - I moved all callbacks into `Rc<T>` in order to make sure that the pointer inside to a `*mut JSObject` doesn't move. This is necessary for supporting `Heap<T>`. > > `RootedCollectionSet` is very general purpose now. Anything with `JSTraceable` can be rooted by `RootedCollectionSet`/`RootedTraceable`. Right now, `RootedTraceable` is only used to hold down dom objects before they're fully attached to their reflector. I had to make a custom mechanism to dispatch the trace call - couldn't figure out how to get trait objects working for this case. > > This has been tested with the following zeal settings: > > GC after every allocation > JS_GC_ZEAL=2,1 > > GC after every 100 allocations (important for catching use-after-free bugs) > JS_GC_ZEAL=2,100 > > Verify pre barriers > JS_GC_ZEAL=4,1 > > Verify post barriers > JS_GC_ZEAL=11,1 Source-Repo: https://github.com/servo/servo Source-Revision: e7808c526c348fea5e3b48af70b7f1a066652097
2015-06-19 22:46:55 +00:00
unsafe {
proxyhandler::init();
servo: Merge #6150 - Upgrade to Spidermonkey 39 (from servo:smupgrade3); r=mbrubeck > Here it is. > > ~~There's two major things that are unfinished here:~~ > - ~~Dealing with the unroot_must_root lint. I'm not sure about the value of this lint with the new rooting API.~~ Done. > - ~~Updating the Cargo.locks to point to the new SM and SM binding.~~ Done. > > I also included my fixes for the rust update, but these will disappear in a rebase. A rust update is necessary to support calling `Drop` on `Heap<T>` correctly when `Heap<T>` is inside a `Rc<T>`. Otherwise `&self` points to the wrong location. > > Incremental GC is disabled here. I'm not sure how to deal with the incremental barriers so that's left for later. > > Generational GC works. SM doesn't work without it. > > The biggest change here is to the rooting API. `Root` was made movable, and `Temporary` and `JSRef` was removed. Movable `Root`s means there's no need for `Temporary`, and `JSRef`s aren't needed generally since it can be assumed that being able to obtain a reference to a dom object means it's already rooted. References have their lifetime bound to the Roots that provided them. DOM objects that haven't passed through `reflect_dom_object` don't need to be rooted, and DOM objects that have passed through `reflect_dom_object` can't be obtained without being rooted through `native_from_reflector_jsmanaged` or `JS::<T>::root()`. > > Support for `Heap<T>` ended up messier than I expected. It's split into two commits, but only because it's a bit difficult to fold them together. Supporting `Heap<T>` properly requires that that `Heap::<T>::set()` be called on something that won't move. I removed the Copy and Clone trait from `Heap<T>` so `Cell` can't hold `Heap<T>` - only `UnsafeCell` can hold it. > > `CallbackObject` is a bit tricky - I moved all callbacks into `Rc<T>` in order to make sure that the pointer inside to a `*mut JSObject` doesn't move. This is necessary for supporting `Heap<T>`. > > `RootedCollectionSet` is very general purpose now. Anything with `JSTraceable` can be rooted by `RootedCollectionSet`/`RootedTraceable`. Right now, `RootedTraceable` is only used to hold down dom objects before they're fully attached to their reflector. I had to make a custom mechanism to dispatch the trace call - couldn't figure out how to get trait objects working for this case. > > This has been tested with the following zeal settings: > > GC after every allocation > JS_GC_ZEAL=2,1 > > GC after every 100 allocations (important for catching use-after-free bugs) > JS_GC_ZEAL=2,100 > > Verify pre barriers > JS_GC_ZEAL=4,1 > > Verify post barriers > JS_GC_ZEAL=11,1 Source-Repo: https://github.com/servo/servo Source-Revision: e7808c526c348fea5e3b48af70b7f1a066652097
2015-06-19 22:46:55 +00:00
}
servo: Merge #11727 - Integrate service worker manager thread (from creativcoder:swmanager); r=jdm <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes are part of #11091 <!-- Either: --> - [X] There are tests for these changes at my [gh-pages](https://github.com/creativcoder/gsoc16/tree/gh-pages) branch to test the instantiation of service workers by their manager, but will need to discuss how that would integrate into master. Changes: - Introduces a `ServiceWorkerManager`, which maintains an map of registered service workers as well as a map of active workers keyed by their `scope_url`. - Adds the initialization of ServiceWorkerManager, at the `script::init()`, which makes it available as a single entity listening for requests from different script threads. - Adds a timeout thread in `serviceworkerglobalscope`, which terminates the workers, after a timeout of 60 secs, thereby removing it from the active workers list. - Adds the matching of scope urls, in longest prefix way rather than path structural way, according to [spec](https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#scope-match-algorithm). - Make ServiceWorkerManager, the holder of network sender, instead of script thread, so it can send `CustomResponse`. <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> Source-Repo: https://github.com/servo/servo Source-Revision: 513811f6b40d522bc425c2588320b889614f2973
2016-07-18 16:50:59 +00:00
// Spawn the service worker manager passing the constellation sender
ServiceWorkerManager::spawn_manager(sw_senders);
// Create the global vtables used by the (generated) DOM
// bindings to implement JS proxies.
RegisterBindings::RegisterProxyHandlers();
perform_platform_specific_initialization();
servo: Merge #6150 - Upgrade to Spidermonkey 39 (from servo:smupgrade3); r=mbrubeck > Here it is. > > ~~There's two major things that are unfinished here:~~ > - ~~Dealing with the unroot_must_root lint. I'm not sure about the value of this lint with the new rooting API.~~ Done. > - ~~Updating the Cargo.locks to point to the new SM and SM binding.~~ Done. > > I also included my fixes for the rust update, but these will disappear in a rebase. A rust update is necessary to support calling `Drop` on `Heap<T>` correctly when `Heap<T>` is inside a `Rc<T>`. Otherwise `&self` points to the wrong location. > > Incremental GC is disabled here. I'm not sure how to deal with the incremental barriers so that's left for later. > > Generational GC works. SM doesn't work without it. > > The biggest change here is to the rooting API. `Root` was made movable, and `Temporary` and `JSRef` was removed. Movable `Root`s means there's no need for `Temporary`, and `JSRef`s aren't needed generally since it can be assumed that being able to obtain a reference to a dom object means it's already rooted. References have their lifetime bound to the Roots that provided them. DOM objects that haven't passed through `reflect_dom_object` don't need to be rooted, and DOM objects that have passed through `reflect_dom_object` can't be obtained without being rooted through `native_from_reflector_jsmanaged` or `JS::<T>::root()`. > > Support for `Heap<T>` ended up messier than I expected. It's split into two commits, but only because it's a bit difficult to fold them together. Supporting `Heap<T>` properly requires that that `Heap::<T>::set()` be called on something that won't move. I removed the Copy and Clone trait from `Heap<T>` so `Cell` can't hold `Heap<T>` - only `UnsafeCell` can hold it. > > `CallbackObject` is a bit tricky - I moved all callbacks into `Rc<T>` in order to make sure that the pointer inside to a `*mut JSObject` doesn't move. This is necessary for supporting `Heap<T>`. > > `RootedCollectionSet` is very general purpose now. Anything with `JSTraceable` can be rooted by `RootedCollectionSet`/`RootedTraceable`. Right now, `RootedTraceable` is only used to hold down dom objects before they're fully attached to their reflector. I had to make a custom mechanism to dispatch the trace call - couldn't figure out how to get trait objects working for this case. > > This has been tested with the following zeal settings: > > GC after every allocation > JS_GC_ZEAL=2,1 > > GC after every 100 allocations (important for catching use-after-free bugs) > JS_GC_ZEAL=2,100 > > Verify pre barriers > JS_GC_ZEAL=4,1 > > Verify post barriers > JS_GC_ZEAL=11,1 Source-Repo: https://github.com/servo/servo Source-Revision: e7808c526c348fea5e3b48af70b7f1a066652097
2015-06-19 22:46:55 +00:00
}