Commit graph

75 commits

Author SHA1 Message Date
Simon Sapin
c08c32ca01 servo: Merge #18900 - Remove use of unstable box syntax (from servo:box_syntax); r=emilio
http://www.robohornet.org gives a score of 101.36 on master, and 102.68 with this PR. The latter is slightly better, but probably within noise level. So it looks like this PR does not affect DOM performance.

This is expected since `Box::new` is defined as:

```rust
impl<T> Box<T> {
    #[inline(always)]
    pub fn new(x: T) -> Box<T> {
        box x
    }
}
```

With inlining, it should compile to the same as box syntax.

Source-Repo: https://github.com/servo/servo
Source-Revision: a9022be0c3e30249845ca5947ac0c0a6743c7991

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 97a17674f72dbfcb99552fe4877789f149ccfc84
2017-10-16 11:21:21 -05:00
Anthony Ramine
c10df37830 servo: Merge #18635 - Rename JS<T> to Dom<T>, Root<T> to DomRoot<T>, and other things (from servo:RENAME-ALL-THE-THINGS); r=emilio
Source-Repo: https://github.com/servo/servo
Source-Revision: 1282e0d8080ae15307ac8d35941754f9d60f0d76

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 7b291b334b5797291cac309f71232069534f53d2
2017-09-26 03:20:05 -05:00
Christian Poveda
c7819127ee servo: Merge #16712 - Changed all prefixes from DOMString to the atomic Prefix from html5ever (from z1mvader:atomize_ns_prefix); r=SimonSapin
<!-- Please describe your changes on the following line: -->
I just changed the `prefix` parameters on the constructors of several HTML elements. The type now is `Option<Prefix>`. I also changed the sizes of the `sizeof.rs` unit test to match the new values.

---
<!-- 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 #16700  (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because it should not affect anything else

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- 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: ed7686b42c02c5c1d769be952ef58b285f35a7f6

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : ade76a808b80fcbb1e011c0b6f7a29c37361559e
2017-05-03 13:33:56 -05:00
Simon Sapin
fd16ec7749 servo: Merge #16689 - Upgrade to html5ever 0.16 (from servo:m5e); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: 8b41c7c137c78aab208fe2991c3ec951fe5f1386

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 234eca73c03f9e482a94c97e49ce5a78d077123e
2017-05-03 08:42:41 -05:00
Anthony Ramine
be2b512750 servo: Merge #15715 - Make #[dom_struct] a proc_macro attribute (from nox:custom-derive); r=SimonSapin
The rustup is needed for https://github.com/rust-lang/rust/pull/40039.

Source-Repo: https://github.com/servo/servo
Source-Revision: a204c4176dcccdad8ec99d74055c66794c3f64ba

--HG--
rename : servo/components/domobject_derive/Cargo.toml => servo/components/dom_struct/Cargo.toml
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 2cad140c3d6b99837f0bd15a6f3ccba0f353e049
2017-02-24 05:56:30 -08:00
Simon Sapin
7cb2f9a2dc servo: Merge #14043 - Update to string-cache 0.3 (from servo:string-cache-up); r=nox
Previously, `string-cache` defined:
*  An string-like `Atom` type,
* An `atom!("foo")` macro that expands to a value of that type, for a set of strings known at compile-time,
* A `struct Namespace(Atom);` type
* A `ns!(html)` macro that maps known prefixed to `Namespace` values with the corresponding namespace URL.

Adding a string to the static set required making a change to the `string-cache` crate.

With 0.3, the `Atom` type is now generic, with a type parameter that provides a set of static strings. We can have multiple such sets, defined in different crates. The `string_cache_codegen` crate, to be used in build scripts, generates code that defines such a set, a new atom type (a type alias for `Atom<_>` with the type parameter set), and an `atom!`-like macro.

The html5ever repository has a new `html5ever_atoms` crate that defines three such types: `Prefix`, `Namespace`, and `LocalName` (with respective `namespace_prefix!`, `namespace_url!`, and `local_name!` macros). It also defines the `ns!` macro like before.

This repository has a new `servo_atoms` crate in `components/atoms` that, for now, defines a single `Atom` type (and `atom!`) macro. (`servo_atoms::Atom` is defined as something like `type Atom = string_cache::Atom<ServoStaticStringSet>;`, so overall there’s now two types named `Atom`.)

In this PR, `servo_atoms::Atom` is used for everything else that was `string_cache::Atom` before. But more atom types can be defined as needed. Two reasons to do this are to auto-generate the set of static strings (I’m planning to do this for CSS property names, which is the motivation for this change), or to have the type system help us avoid mix up unrelated things (this is why we had a `Namespace` type ever before this change).

Introducing new types helped me find a bug: when creating a new attribute `dom::Element::set_style_attr`, would pass `Some(atom!("style"))` instead of `None` (now `Option<html5ever_atoms::Prefix>` instead of `Option<string_cache::Atom>`) to the `prefix` argument of `Attr::new`. I suppose the author of that code confused it with the `local_name` argument.

---

Note that Stylo is not affected by any of this. The `gecko_string_cache` module is unchanged, with a single `Atom` type. The `style` crate conditionally compiles `Prefix` and `LocalName` re-exports for that are both `gecko_string_cache::Atom` on stylo.

---
<!-- 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
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] 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: 5b4cc9568dbd5c15e5d2fbc62719172f11566ffa
2016-11-03 11:19:44 -05:00
Corey Farwell
d56acf89ae servo: Merge #13783 - Implement value property on <select> (from frewsxcv:select-value); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: a71b1e65be0ce40ebc78cf9ec248e7ff41d179ce
2016-10-17 02:47:48 -05:00
Arthur Marble
8c93f25e9f servo: Merge #13307 - Code refactoring (from bubbles231:code_refactor); r=Manishearth
<!-- Please describe your changes on the following line: -->
The code was refactored to follow Rust naming conventions better.

---
<!-- 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 help fix #12379.

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because logic was not changed.

<!-- 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: 5457b80233f9ce6773711c7189230d9a0a63d93a
2016-09-18 22:57:59 -05:00
Alexandrov Sergey
adc4f599c1 servo: Merge #13126 - Html option element.form#13111 (from splav:HTMLOptionElement.form#13111); r=metajack
<!-- Please describe your changes on the following line: -->
Add HTMLOptionElement form attribute support

---
<!-- 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 #13111 (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: e07ee3f4cf1a437c7cbee78c47be45216b82521b
2016-08-30 13:18:10 -05:00
Kuba Birecki
c2d666ebcc servo: Merge #12443 - Inline DOM element creation into box expressions in components/script/dom/ (from ice9js:cleanup/inline-dom-element-creation); r=Ms2ger
Takes care of #12436.

---
<!-- 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 #12436.

<!-- Either: -->
- [X] These changes do not require tests because the changes do not affect any functionality.

<!-- 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: f3f134707506c311ad89deb8f9177c05f59bd483
2016-07-14 01:30:22 -07:00
Anthony Ramine
0f1c59e62d servo: Merge #12256 - Move some stuff from util to style (from nox:die-util-die); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: bb916bb38bc4298477bfc8134b94dc906054bce1

--HG--
rename : servo/components/util/str.rs => servo/components/style/str.rs
rename : servo/components/util/tid.rs => servo/components/style/tid.rs
rename : servo/tests/unit/util/str.rs => servo/tests/unit/style/str.rs
2016-07-05 02:04:42 -07:00
Anthony Ramine
5aa3cb5ed3 servo: Merge #11326 - Move DOMString back to script (from nox:non-geckolib); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 6abcd793d780369767385b01b02ee725d6b10585
2016-05-24 02:07:29 -07:00
Emilio Cobos Álvarez
83aa64a599 servo: Merge #9510 - Update rust-selectors (from nox:bump-selectors); r=SimonSapin
This commits updates rust-selectors to use the generic parser, and as
such it moves the element state into the style crate.

Source-Repo: https://github.com/servo/servo
Source-Revision: ae20f2556bc7807b39b6649ac1f738644abcc26a
2016-02-03 06:35:11 +05:01
Dongie Agnir
b16cb79ed9 servo: Merge #9074 - Ask for reset when option is removed (from dagnir:ask-for-reset-on-remove); r=nox
Now that `UnbindContext` is available, asking the `select` element for a reset when an option is removed is now possible.

Link to the spec: https://html.spec.whatwg.org/multipage/#ask-for-a-reset

Source-Repo: https://github.com/servo/servo
Source-Revision: e7212953f1fe808bde688ae867417285e9f515a4
2015-12-29 16:14:32 +05:01
Anthony Ramine
ef99a3f214 servo: Merge #8506 - Properly propagate changes when range or trees are mutated (from nox:finish-ranges); r=dzbarsky
Does the same thing as #6817, but storing Range instances directly in their start and end containers.

Cc @dzbarsky

Source-Repo: https://github.com/servo/servo
Source-Revision: 89ab368258eb827b0dcc8d6e6deecd3ed3c1de71
2015-12-26 03:39:15 +05:01
Eli Friedman
70ebd13eff servo: Merge #8786 - Remove unnecessary conversion to/from DOMString for localName (from eefriedman:localname-atom); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 63762d2b52ee6026216d304c8826bf8b4a5fdd20
2015-12-03 14:36:22 +05:01
Eli Friedman
ab5455716f servo: Merge #8703 - Compute attribute name atoms at compile-time (from eefriedman:dom-getter-setter-atom); r=frewsxcv
Source-Repo: https://github.com/servo/servo
Source-Revision: eadaf30af396857535ad15b269bcba4f58e1ff9a
2015-11-28 20:11:07 +05:01
Alan Jeffrey
f4ab2bfdb5 servo: Merge #8667 - Update string cache (from asajeffrey:update-string-cache); r=SimonSapin
Updated string_cache to 0.2, and updated the dependencies that depend on string_cache.
Removed references to string_cache_plugin.
Import atom! and ns! from string_cache.
Replaced ns!("") by ns!().
Replaced ns!(XML) and co by ns!(xml) and co.
Replaced Atom::from_slice by Atom::from.
Replaced atom.as_slice() by &*atom.

r? @SimonSapin

Source-Repo: https://github.com/servo/servo
Source-Revision: 188fa9378c103093f1f8dac24bff0d9d237fd2bc
2015-11-25 23:41:39 +05:01
Alan Jeffrey
f8093754b7 servo: Merge #8477 - Opaque DOMString (from asajeffrey:opaque-domstring); r=asajeffrey
This patch makes DOMString an opaque wrapper round String (currently it's a transparent wrapper).

The changes are:

* Replacing DOMString(foo) by DOMString::from(foo).
* Replacing foo.0 by String::from(foo).
* Adding functions clear, push_str and extend for in-place mutation of DOMStrings.
* Replacing DOMString by String in other threads (devtools, storage and filereader).
* Making DOMString implement !Send.
* Removing the pub attribute from the contents of DOMString.

This enables experimenting with other string representations in the DOM.

Source-Repo: https://github.com/servo/servo
Source-Revision: 62acdd303b78951885c2c90747b31f318907d6c9
2015-11-13 06:48:30 +05:01
Ms2ger
7cb2a13f43 servo: Merge #8312 - Make DOMString a newtype around String, rather than a typedef (from Ms2ger:DOMString); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: abfd1fb1bf071961bc8a581927eaa96a2d3e2cba
2015-11-04 16:18:41 +05:01
rohan.prinja
e8b504412b servo: Merge #8221 - move modules around (from ajnirp:8130-reorganise); r=jdm
for #8130

Source-Repo: https://github.com/servo/servo
Source-Revision: daad09d44245228fba9118316937add71bec7c58
2015-11-04 02:27:02 +05:01
Eli Friedman
86179d45d6 servo: Merge #8245 - Use attribute getter/setter macros for misc DOM attributes (from eefriedman:misc-attribute-fixes); r=nox
This fixes a few minor bugs.

Source-Repo: https://github.com/servo/servo
Source-Revision: 50d51bab7faa5ce52e9f345eee3d49886433289f
2015-11-02 14:45:32 +05:01
Bobby Holley
5db6816cd0 servo: Merge #8162 - Centralize event states in rust-selectors (from bholley:centralize_event_states); r=pcwalton
This still needs a rev bump on rust-selectors once https://github.com/servo/rust-selectors/pull/55 gets merged.

Source-Repo: https://github.com/servo/servo
Source-Revision: 521a87180a85709f8f704df33537f79bd131bf71
2015-10-31 09:36:45 +05:01
Dongie Agnir
df914bbdba servo: Merge #7963 - Implement ask_for_reset for HTMLSelectElement (from dagnir:issue-7774); r=eefriedman
Fixes #7774

Source-Repo: https://github.com/servo/servo
Source-Revision: 3951c577bf2ec0f809d81752737fccac966537a8
2015-10-28 07:16:02 +05:01
Anthony Ramine
bb8125a3da servo: Merge #8041 - Introduce trait Castable (from nox:castable); r=jdm
Removes all those messy FooCast structures in InheritTypes.rs.

Source-Repo: https://github.com/servo/servo
Source-Revision: 674589c370d978f543e71f995d58c5b28e6e9842
2015-10-21 07:57:32 -06:00
Adam Szopa
7ecd87862f servo: Merge #8099 - Remove explicit lifetimes which can be elided (from Darktori:master); r=mbrubeck
Fixes https://github.com/servo/servo/issues/8069

Source-Repo: https://github.com/servo/servo
Source-Revision: 941c06eb99533c6c1d55b4ad3b51804badf48a23
2015-10-20 17:30:57 -06:00
Bobby Holley
ad33b14737 servo: Merge #7935 - Move event state from Node to Element (from bholley:eventstate_element); r=nox
Just getting my feet wet with Rust here. Please feel free to nit the hell out of it stylistically and idiomatically. :-)

Source-Repo: https://github.com/servo/servo
Source-Revision: ff2151b8bbc62fa29c90a429b7a4f12520420b6e
2015-10-19 02:47:21 -06:00
Anthony Ramine
06fd534a1b servo: Merge #8020 - Generate all Derived implementations in codegen (from nox:codegen-derived); r=Ms2ger
Follow-up of #7873.

@Ms2ger r? :)

Source-Repo: https://github.com/servo/servo
Source-Revision: 417cf5738e4609f4b2e34e9e0c4f7ef68f087432
2015-10-15 12:53:08 -06:00
Anthony Ramine
d5038d123e servo: Merge #7873 - Generate the various TypeId enums in codegen (from nox:codegen-typeid); r=Ms2ger
This frees us forever from caring about maintaining these enums. The last commit removes their use from the initialisation of interface objects derived from Node.

Source-Repo: https://github.com/servo/servo
Source-Revision: 32daa17d5cbcad02db0713e21e52410cdc60480e
2015-10-14 12:47:48 -06:00
Corey Farwell
795e875ef6 servo: Merge #7960 - Replace usage of old-style WHATWG spec links (from frewsxcv:update-spec-links); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 4052a22a1c6826cb18f03de9d2f6aed82d809e71
2015-10-10 10:17:52 -06:00
Ms2ger
7aa06b4cee servo: Merge #7901 - Cleanup the HTMLOptionElement#text implementation (from Ms2ger:option-text); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: 84d8f65d229e748bcd0c75e998adb8432575044a
2015-10-07 04:51:14 -06:00
Corey Farwell
3dbd001c70 servo: Merge #7776 - Avoid allocations when joining strings (from frewsxcv:str-join); r=mbrubeck
Source-Repo: https://github.com/servo/servo
Source-Revision: 4823ec947ef43fd685b69d42ff11c8b0aba72d69
2015-09-29 16:59:14 -06:00
Corey Farwell
803162b7a6 servo: Merge #7775 - Link to 'ask for a reset' tracking issue (from frewsxcv:tracking-issue); r=jdm
FIXME added in  https://github.com/servo/servo/pull/7745

Source-Repo: https://github.com/servo/servo
Source-Revision: ed0d70e2347648f7a0e7166fed8fb42b99b99fbc
2015-09-28 21:34:19 -06:00
Corey Farwell
64fbdb7d1c servo: Merge #7745 - Implement <option> 'defaultSelected' and 'selected' attributes (from frewsxcv:html-option-element-selected); r=nox
Continued from #7743

Source-Repo: https://github.com/servo/servo
Source-Revision: 8547d132f9a6f5499c437572ea5648c6baf2f621
2015-09-28 15:46:48 -06:00
Brandon Fairchild
f7fb1e4b4a servo: Merge #7662 - Check for multiple import blocks separated by whitespace (from nerith:import); r=frewsxcv
Fixes #7381.

Source-Repo: https://github.com/servo/servo
Source-Revision: a0d3c9223f09757124b1520c4f17e94fa8bbe249
2015-09-19 13:34:51 -06:00
Anthony Ramine
719d3d7bcc servo: Merge #7452 - Introduce VirtualMethods::attribute_mutated() (from nox:cleanup-attributes); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: eaf90c0b1c14717fb580bb0bdb8f6c4db363ace6
2015-09-02 08:14:33 -06:00
Anthony Ramine
c327bc7867 servo: Merge #7416 - Make the traits for the IDL interfaces take &self (from nox:methods-ref); r=frewsxcv
Source-Repo: https://github.com/servo/servo
Source-Revision: 71b277d5675556e61a82ae9dbf3105449c3a8275
2015-08-27 15:08:41 -06:00
Anthony Ramine
d2ee701ee9 servo: Merge #7401 - Remove helper traits (from nox:rm-helpers); r=Manishearth
Now that `JSRef<T>` is gone, there is no need to have helper traits.

Source-Repo: https://github.com/servo/servo
Source-Revision: 909429702972d53bf02dfe9a4aa93ea0cb588cf4
2015-08-27 09:38:48 -06:00
João Oliveira
d39bd47b08 servo: Merge #7361 - make dom_struct derive HeapSizeOf (from jxs:master); r=Ms2ger
closes #7357

Source-Repo: https://github.com/servo/servo
Source-Revision: 532fd19d69fd11d06bca7539c722a46fab2c4419
2015-08-27 02:35:45 -06:00
Manish Goregaokar
8c0333b4f1 servo: Merge #7397 - Remove doublepointer in VirtualMethods, and from_borrowed_ref (from Manishearth:doublepointer-meet-fire); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: 48945b0fc1b1f1bee77f6cb30ac10e17614ef283
2015-08-26 15:01:12 -06:00
Johann Tuffe
5c3a5a67f5 servo: Merge #7265 - Add alphabetical order check for use statements (from tafia:tidy-use); r=Ms2ger
close #7112

Source-Repo: https://github.com/servo/servo
Source-Revision: a5fbb2f2a6fa79755f975feff2435abb6a5dd0e9
2015-08-20 07:43:56 -06:00
Bogdan Cuza
b3e4dcef5f servo: Merge #7097 - Measure heap memory usage for more types. Fixes #6951 (from boghison:memtypes); r=jdm
Also adds HeapSizeOf implementations/derive for some types. I've used "Cannot calculate Heap size" as a reason everywhere, because my imagination is rather limited. If you'd like me to change this message for specific types, please write something like this: "Trusted - Cannot calculate Heap size for Trusted" so that it would be easier for me to replace them through a script :)

Source-Repo: https://github.com/servo/servo
Source-Revision: a03616f379c255cc6c9b6e1d04dd7d98bd9926ce
2015-08-13 13:16:14 -06:00
Simon Sapin
72eb9c272a servo: Merge #6850 - Upgrade to rustc 1.3.0-dev (87055a68c 2015-07-30) (from servo:rustup_2015-07-30); r=SimonSapin
This builds and passes unit tests.

Source-Repo: https://github.com/servo/servo
Source-Revision: 4837dd9a1c172a55bfad0a7ae67dc3b64753be9a
2015-07-30 14:46:13 -06:00
Michael Wu
7512d04e93 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 16:46:55 -06:00
Corey Farwell
333cc6c59d servo: Merge #6174 - Reduce max line length from 150 to 120 characters (from frewsxcv:cleanup-long-lines); r=SimonSapin
Part of https://github.com/servo/servo/issues/6041

Source-Repo: https://github.com/servo/servo
Source-Revision: 542519ebfd073662bc9421ac5fa0aa01ebc0d6fe
2015-05-24 18:27:26 -05:00
Anthony Ramine
6f381b46bd servo: Merge #5921 - Partially implement getter of Document (from nox:document-getter); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: a635a8f9531f781895a00b96bfbdc3a26b961eca
2015-05-14 12:09:18 -05:00
Anthony Ramine
8bcfe1b851 servo: Merge #5931 - Remove helpers that correspond to DOM methods (from nox:rm-helpers); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 16a7c792b564a6eab48391865a7060b8dba38284
2015-05-06 01:31:26 -05:00
Anthony Ramine
39e9571d13 servo: Merge #5871 - Cleanup JS traits and methods (from nox:rootable); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: b8ae33e510ea30e3200834fc2f7fbc426b86701e
2015-04-28 04:23:05 -05:00
Ms2ger
126ec4d408 servo: Merge #5847 - Avoid as_slice() / at_mut_slice() (from Ms2ger:slice); r=SimonSapin
Source-Repo: https://github.com/servo/servo
Source-Revision: 1389be37823fccf4108f4e79d0a3a793f0bbe93e
2015-04-26 05:30:28 -05:00
Ms2ger
bb2f4548b4 servo: Merge #5680 - Update some URLs (from Ms2ger:urls); r=Manishearth
The HTML spec's division into pages is not stable, so it is safer to use the
URL without a specific page (which will redirect).

Source-Repo: https://github.com/servo/servo
Source-Revision: 894b19526f1903f398c7817567b7d1b1e34998ed
2015-04-14 03:52:08 -05:00