Commit graph

308 commits

Author SHA1 Message Date
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
Eli Friedman
7cf10cb041 servo: Merge #8026 - Fix uses of JS<T> as a type on the stack (from eefriedman:js-rooting); r=nox
`JS<T>` belongs on the heap, and only on the heap.  This is a collection of fixes so that code uses either `Root<T>` or `&T` to pass around garbage-collected pointers.

Ideally, we could completely ban constructing a `JS<T>` outside of constructor functions, but we aren't quite there yet.

Source-Repo: https://github.com/servo/servo
Source-Revision: 7c7dbde0f4372037aac3635b8d81531ca9cdced3
2015-10-16 08:05:59 -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
Eli Friedman
9485a11014 servo: Merge #7997 - Link to the HTML multipage spec, not the single-page one (from eefriedman:html-spec-multipage); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 9fca41c7a7498cb6e27b914c45290dc4639d6f8b
2015-10-13 12:54:10 -06:00
Pierre Chevalier
abc6fc4ff8 servo: Merge #7932 - Refactor away duplication of get_rooted functionality (from pierrechevalier83:fix_issue_7929); r=jdm
Refactor .get().map(Root::from_rooted)
and .get().map(|foo| foo.root())
to .get_rooted() on MutNullableHeap objects.

First part done mechanically with the following comand:
sed -i s/"get().map(Root::from_rooted)"/"get_rooted()"/g *.rs

Second part done manually after finding them with
git grep ".get().map("

Fixes #7929.

Source-Repo: https://github.com/servo/servo
Source-Revision: 96356a4b339af07831dec79e0084079328b43b53
2015-10-09 05:23:25 -06:00
Anthony Urena
1481b17cee servo: Merge #7882 - Refactor Error enum usage to consistently be qualified (from anthgur:consistent-enum-use); r=Ms2ger
Closes #7869

Source-Repo: https://github.com/servo/servo
Source-Revision: f5cd90805ec67fb52f73ec4cef9cef881a67522d
2015-10-06 04:58:17 -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
Patrick Walton
79d75f2737 servo: Merge #7736 - Less ambitious optimize set property (from pcwalton:less-ambitious-optimize-set-property); r=Ms2ger
Splitting the parts that have r+ out of #6823.

Source-Repo: https://github.com/servo/servo
Source-Revision: d7b875170956f3a26b46e49d3d5c990fa4acc974
2015-09-24 19:57:40 -06:00
Ravi Shankar
7d512d50d1 servo: Merge #7698 - sorted the declarations in various files (from Wafflespeanut:sorting); r=frewsxcv
This is a direct extract from my abandoned PR for a lint (#7546), along with some rather clumsy modifications (only on `components/script/dom/mod.rs` and `components/style/lib.rs`), because I had to sort some of the files again to make peace with tidy, which hasn't been educated about sorting yet!

Source-Repo: https://github.com/servo/servo
Source-Revision: a7208869f2903e36f9b2f540b55b50283d7df466
2015-09-23 15:02:56 -06:00
Corey Farwell
43dad6ecf9 servo: Merge #7689 - Add/update spec links for SupportedPropertyNames methods (from frewsxcv:supported-property-names-links); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: 566f1eb6f6886ab87c2c1813ec13a34074cced8e
2015-09-20 10:21:22 -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
João Oliveira
2cd22c245e servo: Merge #7631 - rewrite uses of map as if let (from jxs:rewrite_uses_of_map); r=jdm
in the end only found this case as re-writable, am i missing some?

Source-Repo: https://github.com/servo/servo
Source-Revision: e3d36bfceb21bc96bb6f791c295a7e18da6e3dc4
2015-09-14 21:31:53 -06:00
Anthony Ramine
d078f1011a servo: Merge #7531 - Implement <template> (from nox:template); r=Ms2ger
All tests using iframes can't currently pass, same for innerHTML-related tests with <template> elements. The latter contradicts the spec, see the links below.

Apart from this, they work, AFAICT.

https://github.com/servo/html5ever/issues/164
https://www.w3.org/Bugs/Public/show_bug.cgi?id=27314

Source-Repo: https://github.com/servo/servo
Source-Revision: 5a0be12e43f92fc64b1d8f5d35f9dadaa4b53521
2015-09-08 02:29:00 -06:00
Tetsuharu OHZEKI
7a67b445e9 servo: Merge #7538 - script: change requestAnimationFrame returns the unsigned long type (from saneyuki:requestAnimationFrame); r=Ms2ger
By https://github.com/whatwg/html/pull/97, the returned type of`requestAnimationFrame()` and the argument type of `cancelAnimationFrame()` are changed to `unsigned long` WebIDL type.

Source-Repo: https://github.com/servo/servo
Source-Revision: 43e7cd5faed53802a9c2ffcac2c171f29f460cff
2015-09-04 02:49:16 -06:00
Prabhjyot Singh Sodhi
3406659245 servo: Merge #7511 - make AttrVal tokens() and atom() return or panic (from psdh:attrtokato); r=Ms2ger
Fixes #7479

Source-Repo: https://github.com/servo/servo
Source-Revision: da02dba9793f373c6c9cdc1e0bd1c3411cfcc4ba
2015-09-02 15:03:10 -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
Corey Farwell
de4ce06ffa servo: Merge #7483 - Enforce linking to spec for method implementations via macros (from frewsxcv:macro-spec-links); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 4984aaf8bfca0698a132e10e9f48cef42d1b8302
2015-08-31 21:17:54 -06:00
Josh Matthews
b308b8b05e servo: Merge #7391 - Replace catch-all experimental flag with fine-grained boolean prefere… (from jdm:prefs); r=Ms2ger
…nces initialized from a JSON document.

Source-Repo: https://github.com/servo/servo
Source-Revision: 72125f070d7faa0f3a927cf8150fabfb382648e7
2015-08-28 10:08:32 -06:00
Corey Farwell
bd3049eecd servo: Merge #7431 - Merge adjacent identical impl sections (from frewsxcv:dom-methods-cleanup); r=Ms2ger
Prior to #7416 and #7401, many of these `impl` sections were not
identical

Source-Repo: https://github.com/servo/servo
Source-Revision: 2f227a034a12158e2592b645c061d92c87c8eba6
2015-08-28 08:49:00 -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
Corey Farwell
9cfa971047 servo: Merge #7389 - Implement 'do nothing' methods on Window and Document (from frewsxcv:implement-nihilistic-methods); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: 8c301c291a210fb75b1b5c4eba928a146578e3e4
2015-08-27 12:30:28 -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
Corey Farwell
7fb2f8eb04 servo: Merge #7254 - Initial implementation of ownPropertyKeys proxy handler (from frewsxcv:own-property-keys); r=Ms2ger
Generates `SupportedPropertyNames` on DOM structs that should implement
it. Most of them are unimplemented now (which can be implemented in
later PRs), with the exception of `HTMLCollection`. Also added a couple
relevant WPT tests.

Closes #6390

Closes #2215

Source-Repo: https://github.com/servo/servo
Source-Revision: d2a8c278eaa159ceacffee767523d4ad0cf83da2
2015-08-20 10:00:44 -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
Michael Howell
1c55a7a5be servo: Merge #7260 - Navigate to a new page even when there's a fragment (from notriddle:issue_7169); r=Ms2ger
Closes #7169

Source-Repo: https://github.com/servo/servo
Source-Revision: 70b9922eb021a41ebdd9f54a4db0e9ddfb17786a
2015-08-19 01:40:28 -06:00
João Oliveira
3436fe7092 servo: Merge #7257 - Replace uses of for foo in bar.iter(), (from jxs:master); r=Ms2ger
and `for foo in bar.iter_mut(), and for foo in bar.into_iter()
(continuation of #7197)

Source-Repo: https://github.com/servo/servo
Source-Revision: 0d6d6a05009606dfbbfc9765d7dc2c745c18f6a5
2015-08-18 02:46:46 -06:00
vectorijk
e1dc101282 servo: Merge #7191 - remove ScriptListener (from vectorijk:removeScriptListener); r=Ms2ger
Fix issue #7175 and for code review

Source-Repo: https://github.com/servo/servo
Source-Revision: 5ab9aa5013801a8ac2b9527a6079c62cc56ff81b
2015-08-16 03:23:27 -06:00
João Oliveira
8410286b02 servo: Merge #7225 - Replace uses of for foo in bar.iter() and for foo in bar.iter_mut() (from jxs:master); r=nox
closes #7197

Source-Repo: https://github.com/servo/servo
Source-Revision: a1b3f477aa541fda4d1b6ccb02c3e56143f4d217
2015-08-15 03:03:21 -06:00
João Oliveira
f0a3f70810 servo: Merge #7208 - replace .len() == 0 with is_empty() (from jxs:master); r=Ms2ger
closes #7198

Source-Repo: https://github.com/servo/servo
Source-Revision: 85022a4c347dca3f5d28cec3010f7e9410217df4
2015-08-14 00:51:59 -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
Josh Matthews
359f94da09 servo: Merge #7132 - Document the use and meaning of the devtools control messages. Fixes … (from jdm:docenum); r=ms2ger
…#6922.

Source-Repo: https://github.com/servo/servo
Source-Revision: f3b7c5cb4b0fab20db51b7560c3b3bb2d115be69
2015-08-13 12:41:48 -06:00
Maciej Skrzypkowski
2a75a8c49e servo: Merge #6757 - Implementing document.hasFocus method, needs tests. #6475 (from mskrzypkows:document_hasFocus); r=jdm
I'm not sure if I have to implement some test for a new document method. As I remember there were tests for document methods, is it changed now? Where should I add tests?

Source-Repo: https://github.com/servo/servo
Source-Revision: 0c5158587d997c69ce3c76062b369b8f0714306e
2015-08-11 15:35:21 -06:00
Ms2ger
b7fff47f1a servo: Merge #7046 - Implement a base_url getter and use it for style attributes (from Ms2ger:base-url); r=dzbarsky
Source-Repo: https://github.com/servo/servo
Source-Revision: 530d4547c945fbf120d546d6e9a31b8f3bacc78f
2015-08-08 06:53:32 -06:00
Ms2ger
4963436268 servo: Merge #7075 - Improve code around Window::load_url (from Ms2ger:load_url); r=dzbarsky
Source-Repo: https://github.com/servo/servo
Source-Revision: a0af7a1581ffaa6b40149affdd5519caa2be015f
2015-08-08 06:09:13 -06:00
Harrison G
163eb94e9f servo: Merge #7073 - Fix requestAnimationFrame timestamps in queue (from HarryLovesCode:master); r=SimonSapin
This resolves #7044 which involved callbacks in a queue not receiving the same timestamp despite the specification saying they should. An extra test was added to verify the correct behavior.

Source-Repo: https://github.com/servo/servo
Source-Revision: d36a10023a9d37a24e2eb182918d790a4b8f55e3
2015-08-07 17:14:48 -06:00
James Graham
f689852d1b servo: Merge #6415 - Add DOMLoad message to constellation that is sent after the DOM Load event is dispatched (from jgraham:dom_load); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 361d94d23ebf2897a240763d28fbb77b3d831b34
2015-08-07 11:30:33 -06:00
Ms2ger
b8e80e6cc9 servo: Merge #6990 - Update Animation Timing links and terminology to the HTML specification (from Ms2ger:update-animatiom-timimg); r=saneyuki
Source-Repo: https://github.com/servo/servo
Source-Revision: afe3d7e747ca75afd8b641e2e4ab99f280a32e26
2015-08-05 14:55:55 -06:00
Josh Matthews
2f1aaef81d servo: Merge #6874 - Start reporting memory usage for Window and all nodes in all DOM tree… (from jdm:domreporting); r=njn
…s for frame treese in script tasks.

This underreports by a significant amount, since only Document, Window and CharacterData (ie. text) nodes are fully represented. That being said, every HTML element in the tree is measured, but only counted as a Node. It's easy to improve this, it just requires adding the appropriate HeapSizeOf derives and increasing the granularity of `measure_memory_for_eventtarget`. google.com shows a dom-tree value of 0.24 MB for me at the moment.

r? @nnethercote

Source-Repo: https://github.com/servo/servo
Source-Revision: 84e25befdd97cf74fb00707dbe150d59d980e977
2015-08-03 21:24:41 -06:00
Patrick Walton
3b92de7a22 servo: Merge #6586 - script: Make the resource task communication use IPC channels (from pcwalton:resource-task-ipc); r=jdm
This change makes Servo use serialized messages over IPC channels for resource loading. The goal is to make it easier to make Servo multiprocess in the future. This patch does not make Servo multiprocess now; there are many other channels that need to be changed to IPC before that can happen. It does introduce a dependency on https://github.com/serde-rs/serde and https://github.com/pcwalton/ipc-channel for the first time.

At the moment, `ipc-channel` uses JSON for serialization. This is because serde does not yet have official support for bincode. When serde gains support for bincode, I'll switch to that. For now, however, the JSON encoding and decoding will constitute a significant performance regression in resource loading.

To avoid having to send boxed `AsyncResponseTarget` trait objects across process boundaries, this series of commits changes `AsyncResponseTarget` to wrap a sender only. It is then the client's responsibility to spawn a thread to proxy calls from that sender to the consumer of the resource data. This only had to be done in a few places. In the future, we may want to collapse those threads into one per process to reduce overhead. (It is impossible to continue to use `AsyncResponseTarget` as a boxed trait object across processes, regardless of how much work is done on `ipc-channel`. Vtables are fundamentally incompatible with IPC across mutually untrusting processes.)

In general, I was pretty pleased with how this turned out. The main changes are adding serialization functionality to various objects that `serde` does not know how to serialize natively—the most complicated being Hyper objects—and reworking `AsyncResponseTarget`. The overall structure of the code is unchanged, and other than `AsyncResponseTarget` no functionality was lost in moving to serialization and IPC.

r? @jdm

Source-Repo: https://github.com/servo/servo
Source-Revision: 2eb122f394651232abd683fc576a5c4288bf277f
2015-07-31 16:06:36 -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
Bogdan Cuza
e9c4da1e57 servo: Merge #6699 - Tidy check for FooMethods in components/script/dom/*.rs and color for tidy (from boghison:tidyspec); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 14ccb22e679722ed3374c8facec21adcf0f2b247
2015-07-28 08:56:39 -06:00
Anthony Ramine
23bb14e6aa servo: Merge #6660 - Introduce VirtualMethods::children_changed() (from nox:children-changed); r=jdm
This virtual method mimics the behaviour of mutation observers and make it more viable than the older child_inserted(), which didn't cover removed nodes and was called as many times as there were inserted nodes.

A few other shortcomings where remove_child() was called directly instead of Node::remove() were also fixed while at it.

Source-Repo: https://github.com/servo/servo
Source-Revision: 705c95dedbbaa60ffd08e70579915e228d5b6ee0
2015-07-25 11:39:20 -06:00
Glenn Watson
614344b835 servo: Merge #6691 - Implement mouseevent.which (needed for enyojs sampler) (from glennw:mouse-which); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: ff86e0094cc4d65c5690a9df8e6996c49f9f076f
2015-07-22 21:53:00 -06:00
Bogdan Cuza
c3f07a520b servo: Merge #6682 - Fix a few issues (from boghison:scripttask); r=jdm
- Use SmallVec<[T; N]>
 - Make find_iframe a free function
 - Make ProgressEvent use enums for bubbles and cancelable
 - Change README, as `rust-snapshot-hash` is just a text file

Source-Repo: https://github.com/servo/servo
Source-Revision: aafc3dfa963b466303d5f241d69036f211aaad00
2015-07-22 12:25:57 -06:00
Ms2ger
60dd967840 servo: Merge #6671 - Renaming browser context to browsing context (from Ms2ger:browser-context); r=jdm
That's what the spec calls it.

Source-Repo: https://github.com/servo/servo
Source-Revision: 3a5e4335d7ff993a859bc5876243423fe4936441
2015-07-20 02:00:30 -06:00
Patrick Walton
31494292e3 servo: Merge #6596 - compositing: Make ScriptListener and LayoutControlChan messages go over IPC (from pcwalton:layout-control-ipc); r=jdm
r? @jdm

Source-Repo: https://github.com/servo/servo
Source-Revision: 64751b8eef5b95de9ac3b9a382b4cb4408cb90c0
2015-07-14 08:46:07 -06:00
David Zbarsky
9ac5edf348 servo: Merge #6624 - Remove some more unnecessary let bindings (from dzbarsky:23338); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 7de4ba0f826f8239d6ac540417028265e62085c5
2015-07-14 07:21:10 -06:00
Ms2ger
34ecbe332d servo: Merge #6604 - Add debug logging to register_named_element and unregister_named_element (from Ms2ger:idmap-debug); r=jdm
I found them helpful; I imagine others might as well.

Source-Repo: https://github.com/servo/servo
Source-Revision: 9e02ef93478c41a3fc6971611b358da6f73625d6
2015-07-11 14:27:49 -06:00
David Zbarsky
0a2c0b81b7 servo: Merge #6552 - Remove some redundant let bindings (from dzbarsky:master); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 236250c3fc7313346e490ce249083bb94d0dad74
2015-07-04 07:34:29 -06:00
David Winslow
b9c1f245a1 servo: Merge #6529 - Refactor #[jstraceable] to #[derive(JSTraceable)] (from dwins:master); r=Manishearth
fixes #6524.  I had to make an additional change not mentioned in the ticket - adding the `#[feature]` to enable deriving custom traits but I assume that's expected at this time.

Source-Repo: https://github.com/servo/servo
Source-Revision: bbb39082e0f640400546d2084a450a8675820a82
2015-07-01 18:27:40 -06:00
Yoav Alon
f960e4635c servo: Merge #6434 - Added support for mouseover and mouseout events (from yoava333:mouseover); r=nox
fixes issue https://github.com/servo/servo/issues/6404

Source-Repo: https://github.com/servo/servo
Source-Revision: 9897125b34762f4756bc40aa43fa2e51b1ef5fa4
2015-06-30 20:05:06 -06:00
Corey Farwell
b40eedb1a8 servo: Merge #6512 - Prefer HTTPS when linking to GitHub Pages (from frewsxcv:https-github-pages); r=SimonSapin
This commit was generated using the following commands:

```
find . -iname "*.webidl" -type f -print0 | xargs -0 sed -i '' 's/http:\(.*\)github.io/https:\1github.io/g'
```

```
find . -iname "*.rs" -type f -print0 | xargs -0 sed -i '' 's/http:\(.*\)github.io/https:\1github.io/g'
```

Source-Repo: https://github.com/servo/servo
Source-Revision: 342ea7a44b26f9cc701b2a10757c4ac0aec93aeb
2015-06-29 00:41:00 -06:00
Glenn Watson
df40315592 servo: Merge #6457 - Trigger reflow after requestAnimationFrame callbacks (from glennw:raf-reflow); r=metajack
Source-Repo: https://github.com/servo/servo
Source-Revision: 6889f5fb4ec618a949c1308ce58099e7fc139d44
2015-06-24 13:51:15 -06:00
Michael Wu
6a46bbff4b servo: Merge #6433 - Fix some warnings caused by the SM upgrade (from michaelwu:fix-smup-warnings); r=metajack
Source-Repo: https://github.com/servo/servo
Source-Revision: 72ead882c08fbd66d59457efd1ebf86ee4ee97f2
2015-06-19 20:56:29 -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
ecoal95
b32a9cd993 servo: Merge #6423 - Use euclid from crates.io (from emilio:euclid); r=glennw
Sorry for not doing it yesterday, I couldn't.

cc @metajack @SimonSapin

Source-Repo: https://github.com/servo/servo
Source-Revision: 4ebb95ccd8e034007eacb447a054919ef4af2bf7
2015-06-18 20:50:22 -06:00
Philipp Hartwig
789c1bea66 servo: Merge #6231 - Restrict output of getElementsByName to HTML elements (from aopicier:get_elements_by_name); r=Ms2ger
Fixes #1745
Should I adjust the expected result of the corresponding wpt test cases?

html/dom/documents/dom-tree-accessors/document.getElementsByName/document.getElementsByName-namespace.html
html/dom/documents/dom-tree-accessors/document.getElementsByName/document.getElementsByName-namespace.xhtml

Source-Repo: https://github.com/servo/servo
Source-Revision: bb95e07f8e75663706f9077138912c4e06c3eac9
2015-06-03 04:14:18 -05:00
Jinwoo Song
6a080bd126 servo: Merge #5981 - Implement NodeIterator (from Jinwoo-Song:nodeiterator); r=Manishearth
Implement NodeIterator's basic functionality. (Fixes #1235)  But the cases for node removals are not implemented yet.

r? @jdm
cc @yichoi

Source-Repo: https://github.com/servo/servo
Source-Revision: 2b52006b1c503a24d5e832934d3265d45e425f40
2015-05-28 05:14:08 -05:00
Patrick Walton
a9af0b6fd4 servo: Merge #6028 - script: Reflow 200 milliseconds after the <body> is parsed, like Gecko does (from pcwalton:reflow-timer); r=jdm
It would be nice if HTML parsing didn't have to hog the event loop, so I didn't have to do this polling in `content_changed()`, but maybe the way we do it is unavoidable.

r? @jdm

Source-Repo: https://github.com/servo/servo
Source-Revision: e604b663f4e664b9a94d61569082b2b62de2151d
2015-05-26 13:18:26 -05:00
Anthony Ramine
9512a913c9 servo: Merge #6140 - Cleanup some gratuitous or inefficient uses of RootedVec (from nox:cleanup-rootedvec); r=Manishearth
Source-Repo: https://github.com/servo/servo
Source-Revision: 7d0409b8421e1b0c055507acc7d784cac890f47e
2015-05-26 08:36:29 -05: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
Josh Matthews
afb6727d56 servo: Merge #5727 - Make external script sources load asynchronously, yet still block furthe (from jdm:parserinterrupt2); r=mbrubeck
...r parsing. Hook up document loading to async networking events.

Relies on https://github.com/servo/html5ever/pull/107, so we'll likely need to backport it rather than wait for the next rustc upgrade.

Source-Repo: https://github.com/servo/servo
Source-Revision: dd319c1a998bbd3eeb84fdc4ca8a41ee7877ca37
2015-05-21 12:37:06 -05:00
Glenn Watson
de0de69bad servo: Merge #6152 - Fix document load event firing after pipeline is closed (from glennw:runnable-panic); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 1060cfde68c8d355b54a271923c9682721c5ed19
2015-05-20 20:01:32 -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
Josh Matthews
204eaa3597 servo: Merge #5804 - Add simple document load tracking infrastructure (from jdm:docloader); r=Ms2ger
This implements a simple load-tracking system and tracks stylesheet loads as an example of how it fits together. This is a simplified and rebased version of #3714; I do not believe that the main thrust of hsivonen's comments (related to tracking navigation in browsing contexts) affect this part of the work.

r? @Ms2ger

Source-Repo: https://github.com/servo/servo
Source-Revision: 2baa69595e2d57213c34b7e168b60885948fa85b
2015-05-11 14:35:33 -05:00
Avi Weinstock
462677c157 servo: Merge #5800 - Made the clipboard-related functionality in TextInput more testable. Add (from aweinstock314:x11-clipboard); r=jdm
...ed test_clipboard_paste to the "test-unit" suite.

Source-Repo: https://github.com/servo/servo
Source-Revision: 5cb1356e9e3dbde9fd841c9aa2d21ea39c5eda18
2015-05-06 16:09:37 -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
Guro Bokum
8059428350 servo: Merge #5753 - Start using on_refresh_driver_tick #5681 (from JIoJIaJIu:timeline); r=jdm
RequestAnimationFrame
[Task](https://github.com/servo/servo/issues/5681)

Source-Repo: https://github.com/servo/servo
Source-Revision: 5e59e77c416dbe35e8c30ca1c21c9088ed17a079
2015-05-06 00:50:13 -05:00
Simon Sapin
95c8716656 servo: Merge #5935 - Upgrade Rust (from servo:rustup_2015-04-25); r=Ms2ger
r? everybody

Source-Repo: https://github.com/servo/servo
Source-Revision: 49aed6555dbc008c1a378c5cbb303f5467232b6b
2015-05-05 09:11:30 -05:00
Peter
76e9e84846 servo: Merge #5725 - added dispatching for mousedown and mouseup events, fixes #5705 (from pgonda:dispatch-mousedown-mouseup); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 88ed4e58e16e1ccf2957e1838175b5195c5d7950
2015-04-30 12:22:03 -05:00
Anthony Ramine
421aa02eae servo: Merge #5839 - Implement base machinery of Range (from nox:range); r=Manishearth
The actual boundary points are behind a Rc<_> value to let nodes be able to store weak references to them in the future.

Source-Repo: https://github.com/servo/servo
Source-Revision: 15c4372a8be9c2b73d9e09bd7684484e48d220e8
2015-04-30 05:59:55 -05:00
Prabhjyot Singh Sodhi
6b09a033e8 servo: Merge #5895 - Uniformise the various Msg types [#5882] (from psdh:uniformiseMsgTypes); r=jdm
Fixes #5882

Source-Repo: https://github.com/servo/servo
Source-Revision: 19a4a263645a643d3a3f79b41b816fe8b8727265
2015-04-29 15:51:39 -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
Manish Goregaokar
e158f4fca9 servo: Merge #5855 - Add move protection to Root and friends (from Manishearth:nomove); r=kmc,munksgaard
fixes #5724, #5737


uses https://github.com/Manishearth/rust-tenacious (can be moved in-tree if needed)

I can make it `Deny` by default too (I'll add a cargo feature to tenacious), though we might want it on
`Warn` until we get some mileage on it.

Source-Repo: https://github.com/servo/servo
Source-Revision: d7987e43c944eb9b156bf3244c08fce4cb570db4
2015-04-27 23:14:25 -05:00
Anthony Ramine
23e99e3703 servo: Merge #5868 - Implement Body.bgColor and Document.bgColor (from nox:document-legacy); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 9ec2ce0decff852f24280a59c779220f243bcff6
2015-04-27 13:06:29 -05:00
Anthony Ramine
293fcb77e2 servo: Merge #5862 - Change MutNullableJS<T> to MutNullableHeap<JS<T>> (from nox:mutnullableheap); r=jdm
This is useful for union types, in cases where we need MutNullableHeap&lt;NodeOrString&gt;.

Source-Repo: https://github.com/servo/servo
Source-Revision: b0ddd8149b04db6bceba0c0b8de852acc1086838
2015-04-27 03:50:08 -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
05a836bb95 servo: Merge #5840 - Replace the Str implementation for AttrValue by a Deref implementation (from Ms2ger:attrvalue-slice); r=SimonSapin
Source-Repo: https://github.com/servo/servo
Source-Revision: b22a6c8095f03fda6e8901dea768af18d474fb31
2015-04-25 08:59:26 -05:00
Anthony Ramine
3a6d2e2fe1 servo: Merge #5768 - Implement SVG support for Document.title (from nox:document-title); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: d037187213234d6c0deb5f2c6439647b5dd1b8a4
2015-04-23 05:20:45 -05:00
Glenn Watson
5dbece9c4a servo: Merge #5559 - Support focus management and keyboard events for iframes (from glennw:iframe-focus); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 8b8daa24b8d25c531ea74a70b4b6e25cb3d7d58c
2015-04-19 18:13:59 -05:00
Bogdan Cuza
d5299d7feb servo: Merge #5567 - Make mouse_over_targets a RootedVec (from boghison:document_rootedvec); r=jdm
Fixes #5539

Source-Repo: https://github.com/servo/servo
Source-Revision: 331708f0f6d4bff8cec608e963fb24f79cf1ffca
2015-04-19 09:05:23 -05:00
Corey Farwell
20e5a87bf8 servo: Merge #5729 - Don't link to specific WHATWG multipage page (from frewsxcv:whatwg-multipage-redirects); r=Manishearth
"Links to the multipage version of the specification are unfortunately
likely to break over time."
-- https://html.spec.whatwg.org/multipage/asefij.html

This commit removes all references to the specific pages when viewing
WHATWG using multipage mode. I went through all these links and they
redirect fine.

Regex used to generate this commit:

`s_whatwg.org/multipage/.*#_whatwg.org/multipage/#_g`

Source-Repo: https://github.com/servo/servo
Source-Revision: d90fe2b0889dee4eb27693aca7670969d5253424
2015-04-17 08:57:33 -05:00
Marcus Klaas
150198541e servo: Merge #5733 - Remove unnecessary clone in Document constructor (from marcusklaas:issue-5719); r=Manishearth
This closes issue https://github.com/servo/servo/issues/5719.

Source-Repo: https://github.com/servo/servo
Source-Revision: c3ed0fd57377c617ef877cd685d3248ce37d1710
2015-04-17 07:53:06 -05:00
Anthony Ramine
91c44dc144 servo: Merge #5721 - Finish implementation of ChildNode and ParentNode (from nox:nodeorstring); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 4fd4370a9680f4845f05efd43ce9cb26c7433f05
2015-04-16 14:47:32 -05:00
Corey Farwell
f3dd3b6bc7 servo: Merge #5693 - Add/update comments with links to spec (from frewsxcv:spec-links); r=jdm
Extracted out of #5649

* add more hyperlinks to associated specification for structs/methods
* follow redirects and update links
* replace broken links
* removal of WHATWG multipage page name since the page name is not
  guaranteed to be stable

Source-Repo: https://github.com/servo/servo
Source-Revision: 3dc25af9e121db010e4385efb3863ba45b0e0bcf
2015-04-14 17:16:55 -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
Corey Farwell
5c841a0070 servo: Merge #5677 - Update WHATWG links to use HTTPS (from frewsxcv:https); r=Ms2ger
Extracted this out of #5649

This commit was created with the following commands:

```
find . -iname "*.webidl" -type f -print0 | xargs -0 sed -i '' 's/http:\(.*\)whatwg.org/https:\1whatwg.org/g'
```

```
find . -iname "*.rs" -type f -print0 | xargs -0 sed -i '' 's/http:\(.*\)whatwg.org/https:\1whatwg.org/g'
```

Source-Repo: https://github.com/servo/servo
Source-Revision: 4997d3a112354a407365fede1ab1944834a2e13c
2015-04-14 02:57:41 -05:00
Anthony Ramine
1eb3ed2549 servo: Merge #5645 - Use a simple Temporary value in TreeIterator (from nox:treeiterator-temporary); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 1e45d025b381390f346e8f24db615cb698033844
2015-04-13 04:52:32 -05:00
Matt Brubeck
65c5670e79 servo: Merge #5592 - Don't allow disabled fields to be focused (from mbrubeck:focusable); r=jdm
This begins implementing parts of the [focusing steps](https://html.spec.whatwg.org/multipage/interaction.html#focusing-steps) algorithm. r? @jdm or @Ms2ger

Source-Repo: https://github.com/servo/servo
Source-Revision: a8b0fb1e79ccc1a3da6ea4f58382b8482cdabd10
2015-04-10 12:25:42 -05:00
Anthony Ramine
eeb520dd32 servo: Merge #5611 - Cleanup CharacterData (from nox:cleanup-characterdata); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 51dd6984f7cc292d77b2330d404ffcff34981214
2015-04-09 10:10:20 -05:00
Anthony Ramine
c096b5ead3 servo: Merge #5590 - Implement Document::CreateAttributeNS() (from nox:document-createattributens); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 9b7bf415d7340cdcac1d272fd1f1145df02c1f5d
2015-04-08 18:55:19 -05:00
Anthony Ramine
39796a9628 servo: Merge #5573 - Implement ParentNode attributes (from nox:parentnode-attributes); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 188a0e7b94942072832964c89d2407ecb4248527
2015-04-08 07:54:13 -05:00
Anthony Ramine
685ac5ef7e servo: Merge #5541 - Use Temporary values in node iterators (from nox:node-iterators-temporary); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: e57630711fed229cb9c939aa31619f42aa62651e
2015-04-07 10:22:10 -05:00
Eric Hegnes
a38989653a servo: Merge #5529 - Consistently name enum members in dom::bindings::error::Error (from ehegnes:issue-5521); r=jdm
Fixes #5521

Source-Repo: https://github.com/servo/servo
Source-Revision: 3c5c2f416b6a0584758ac98c3d984288cad80aba
2015-04-06 15:16:39 -05:00
Anthony Ramine
134001e790 servo: Merge #5503 - Cleanup attribute handlers (from nox:cleanup-attributes); r=Manishearth
This makes all tests in attributes.html pass.

Source-Repo: https://github.com/servo/servo
Source-Revision: 8d1a6c45f656de67115e72cc927f81c2d72e03a2
2015-04-06 12:36:09 -05:00
Matt Brubeck
590a7bc62f servo: Merge #5461 - Implement the :focus pseudo-class selector and element.focus/blur (from mbrubeck:focus); r=jdm
Fixes #5460. This supports for simple focusable elements that are their own DOM anchors, like text `input` fields.

Requires servo/rust-selectors#20.  r? @SimonSapin

Source-Repo: https://github.com/servo/servo
Source-Revision: b63fb0c0a7e9cd9208d66319c910750aaaac844c
2015-04-04 18:21:48 -06:00
Ms2ger
82f444e9cd servo: Merge #5511 - Stop using int/uint in script (from Ms2ger:int); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 036b3eaa04fc4d94b8fd29a9c8e0f6020f55d23d
2015-04-03 13:54:46 -06:00
Manish Goregaokar
ab1238f36e servo: Merge #5465 - Split out shared networking code into net_traits crate (from gilles-leblanc:issue-4476-b); r=jdm
Fixes #4476

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

--HG--
rename : servo/components/net/image/test.jpeg => servo/components/net/test.jpeg
rename : servo/components/net/image/base.rs => servo/components/net_traits/image/base.rs
rename : servo/components/net/image/holder.rs => servo/components/net_traits/image/holder.rs
rename : servo/components/net/local_image_cache.rs => servo/components/net_traits/local_image_cache.rs
2015-04-03 13:00:46 -06:00
Ms2ger
e137b3f89d servo: Merge #5492 - Introduce a MouseButton enum (from Ms2ger:MouseButton)
Source-Repo: https://github.com/servo/servo
Source-Revision: 02be76bd4855a226669e8fcd1a638ff53e8f83d5
2015-04-03 13:29:12 +02:00
Corey Farwell
ec44d356c9 servo: Merge #5484 - Improvements, cleanup for script::dom::document (from frewsxcv:document-cleanup); r=Ms2ger
* Add whatwg spec links for some Document methods
* Wrap some lines that exceed 100 characters
* Other misc cleanup/refactoring

Source-Repo: https://github.com/servo/servo
Source-Revision: c38d9ba6b9c71669a14890db82a512c0af483c14
2015-04-02 22:45:41 -06:00
Patrick Walton
cb3bd424c4 servo: Merge #5426 - script: Stop destroying all flows on every mouse-over event (from pcwalton:mouse-over-incremental-reflow); r=jdm
r? @jdm

Source-Repo: https://github.com/servo/servo
Source-Revision: 5457ec60983481fb436114d548f0872e274e420f
2015-04-02 09:57:40 -06:00
Ms2ger
7e83787b33 servo: Merge #5456 - Rewrite NodeChildrenIterator to return Temporary (from Ms2ger:children); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 88bc64444c99fc47febf8e99c0e19c6ae3500990
2015-04-02 05:15:38 -06:00
Corey Farwell
f68ba10506 servo: Merge #5447 - Remove some unnecessary uses of as_slice (from frewsxcv:as-slice); r=jdm
For the majority of these cases, `as_slice` can be removed due to
`Deref`. In particular, `Deref` for:

* `String` -> `str`
* `Atom` -> `str`

The latter of those two requires, a bump of the locked `string-cache`
library

Source-Repo: https://github.com/servo/servo
Source-Revision: 0fd41847a39be387c03bd5d8b6f2aec2b1bb6f66
2015-03-29 14:52:02 -06:00
Avi Weinstock
fc2aad4b45 servo: Merge #5359 - Moz events (from aweinstock314:moz-events); r=jdm
Addresses #5352.

This is based on https://github.com/glennw/servo/tree/moz-events

Source-Repo: https://github.com/servo/servo
Source-Revision: 432739164b1f3a117c0aac1dfc97b41018c89b46
2015-03-25 20:00:54 -06:00
Glenn Watson
1200ff0934 servo: Merge #5339 - Add mozbrowser events for location + title change (from glennw:moz-events); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 644dc405863cc5cdf7c562588cdd05c40d00ee35
2015-03-25 13:39:49 -06:00
Corey Farwell
bff27f2f8e servo: Merge #5334 - Cleanup and modernize script::dom::document (from frewsxcv:cleanup-document); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 8f4526842087c0e47a51d320d06749980ed94ecb
2015-03-24 06:54:48 -06:00
Corey Farwell
34bf7826c9 servo: Merge #5321 - Add TODO comments for a recently opened issue (from frewsxcv:patch-1); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: ca79abe45871b4bfe8e8162cb39f8b6bacd0b0b6
2015-03-23 07:57:50 -06:00
Ms2ger
a9cd0f12b3 servo: Merge #5323 - Fix warnings in script (from Ms2ger:script-warnings); r=Manishearth
Source-Repo: https://github.com/servo/servo
Source-Revision: f9826c3ae80a9d859fc067dcceddf3ab105656f6
2015-03-23 06:57:50 -06:00
Glenn Watson
2ee608fe49 servo: Merge #5281 - Experimental implementation of (a small subset of) mozbrowser APIs (from glennw:mozbrowser); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 1f682d878db99651bfd26b8a28b57895f2238f87
2015-03-22 21:36:51 -06:00
Corey Farwell
7cb441f853 servo: Merge #5316 - Stop abusing format! macro when construct a String (from frewsxcv:no-format-abuse); r=jdm
In these cases for `format!`, we're just constructing a String of the
single argument with no special format.

Source-Repo: https://github.com/servo/servo
Source-Revision: dfb8929b001c8d0fb6d5e63f5a9d6dcc17cb388a
2015-03-22 19:30:51 -06:00
Corey Farwell
2a6d042d29 servo: Merge #5307 - Tidy up script::dom::document.SetBody (from frewsxcv:document-set-body); r=jdm
There were a few things that were bothering me with `SetBody`:

* The 'Step 3' comment is in the wrong place
* The logic of 'Step 4' comes before 'Step 3'
* 'Step 5' was not documented

Source-Repo: https://github.com/servo/servo
Source-Revision: 445f1c891a5536a26b4759ba4b2dab99c31505f4
2015-03-22 10:09:46 -06:00
Manish Goregaokar
5dbe6eb389 servo: Merge #5296 - Replace unsafe_blocks by unsafe_code (from servo:unsafe_code); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 29a36adbe7d87fb38ba9bef3a718c6c823fb5977
2015-03-21 05:12:45 -06:00
Maciej Skrzypkowski
22557a07cf servo: Merge #4819 - Added document.activeElement attribute (from mskrzypkows:document_activeElement); r=jdm
#4770

Source-Repo: https://github.com/servo/servo
Source-Revision: 459c35441612d3247450e253b1dcd0bc003985ae
2015-03-19 22:30:49 -06:00
Ms2ger
66cb126a50 servo: Merge #5256 - Upgrade rustc to d3c49d2140fc65e8bb7d7cf25bfe74dda6ce5ecf/rustc-1.0.0-de (from servo:rustup_20150311); r=jdm
...v.

Relies on:
* https://github.com/servo/rust-geom/pull/72
* https://github.com/servo/rust-glx/pull/10
* https://github.com/servo/gleam/pull/15
* https://github.com/servo/rust-mozjs/pull/137
* https://github.com/servo/rust-core-text/pull/35
* https://github.com/servo/rust-io-surface/pull/28

Source-Repo: https://github.com/servo/servo
Source-Revision: 99cf9dbfc107bacb84dfe5afa9539a0ede3beac2
2015-03-18 11:25:00 -06:00
Matt McCoy
6554a779ae servo: Merge #4736 - Fixes #4508 dispatching input event at HTMLTextareaElement (from mattnenterprise:dispatch_input_event); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 65d4b12bf20783ea784f1c61f4b33ec0fc975f4f
2015-03-17 22:27:47 -06:00
Martin Schröder
c74d131b81 servo: Merge #5169 - Refactored optional argument "last_modified" for Document (from mschroeder:issue-4981); r=saneyuki
Fixes #4981

Source-Repo: https://github.com/servo/servo
Source-Revision: ccc6faa14787765485dae7ccd0976cd7e1764185
2015-03-16 11:03:58 -06:00
Rohan Prinja
4862e6cd2b servo: Merge #5218 - make MouseEvent::new() and UIEvent::new() take enums for the bubbles and (from ajnirp:enums-for-mouse-ui-event-constructors); r=Ms2ger
... cancelable arguments

for #4807

Source-Repo: https://github.com/servo/servo
Source-Revision: f30faeadd09b7ef553df9d270abeb3c242c4ce3a
2015-03-15 03:18:49 -06:00
Glenn Watson
2d6792a0af servo: Merge #5188 - Perform reflow if load events dirty any nodes (from glennw:reflow-events); r=jdm
This fixes some test failures that begin occurring when other events (such as resize) are fixed to only occur when needed.

Source-Repo: https://github.com/servo/servo
Source-Revision: 19827658deaf21eb811203f89c78a0f99e631ad4
2015-03-10 16:57:47 -06:00
Adenilson Cavalcanti
a16514e129 servo: Merge #5150 - Implements reflow events debugging (from Adenilson:reflowNotifications03); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 4f3feed2bea957de0910a136d33dff4fb3c07a22
2015-03-06 21:48:50 -07:00
Prabhjyot Singh Sodhi
a887f33c39 servo: Merge #5054 - implement missing steps from "prepare a script" algorithm (from psdh:scriptimplementation); r=jdm
Fixes #4089

Source-Repo: https://github.com/servo/servo
Source-Revision: 73e5bbec4316c2e9b83121d5127687c20e1fb796
2015-03-06 13:36:53 -07:00
Keith Yeung
31f44a00d3 servo: Merge #5127 - Added type parameter to PartialEq on JSRef (from KiChjang:partial-eq-jsref); r=Ms2ger
Fixes #5112, #3960

Source-Repo: https://github.com/servo/servo
Source-Revision: 67548a6244f0cf92f6b71507b69dceb2115d1aa2
2015-03-05 01:15:44 -07:00
Adenilson Cavalcanti
500496a046 servo: Merge #5144 - Remove flush_layout() (from Adenilson:removeFlushLayout01); r=Manishearth
Due to changes on Page/Window interfaces, we no longer have use for flush_layout().

Source-Repo: https://github.com/servo/servo
Source-Revision: 34289943e354b2ac0e54fd1fe2d65c944f6c8e9d
2015-03-04 16:54:44 -07:00
Josh Matthews
6ff0a01710 servo: Merge #5118 - Async document loads (from jdm:pageload); r=Ms2ger
Rebased and improved version of #4967.

Source-Repo: https://github.com/servo/servo
Source-Revision: 72f8898990f06e7f505eeaf9cfa671740c60395d
2015-03-03 16:03:45 -07:00
Keith Yeung
6473e1f89e servo: Merge #5111 - Implementation of step 1 activation behavior of htmlanchorelement (from KiChjang:step-1-anchor); r=Manishearth
Fixes #4871

Source-Repo: https://github.com/servo/servo
Source-Revision: fed878710c5697b49ccf5185ebe08a58be27073f
2015-03-01 22:18:49 -07:00
Guro Bokum
5f7ffbe627 servo: Merge #5073 - Move body of ScriptTask::handle_mouse_move_event into a method on Document (fixes #5032) (from JIoJIaJIu:handle_mouse_event); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 75060f41dbd6c9a6e8865f1c1c88f5b984b199f7
2015-02-28 12:21:51 -07:00
Liam Zdenek
0ac8f1f430 servo: Merge #5059 - Click event is now a MouseEvent (from saneyuki:event); r=jdm
Fix #4260

Pick up: This original commit is https://github.com/servo/servo/pull/4718.

Source-Repo: https://github.com/servo/servo
Source-Revision: b261d27ac5fc5e8a858b344087792f9b1709ee55
2015-02-28 09:21:54 -07:00
James Gilbertson
eaced89b69 servo: Merge #5066 - Implemented Document.currentScript (from luniv:document-currentscript); r=jdm
Implements https://github.com/servo/servo/issues/5057 (Document.currentScript)

Source-Repo: https://github.com/servo/servo
Source-Revision: 26567ef2e62597b359c179f8665213002e05da96
2015-02-27 11:30:57 -07:00
Keith Yeung
c82108a005 servo: Merge #5031 - Moved dispatch_key_event method from script_task.rs to document.rs (from KiChjang:refactor-dispatch-key-event); r=jdm
Fixes #4982

Source-Repo: https://github.com/servo/servo
Source-Revision: 071941da59e442ad359d97e7c36e387c0029f9aa
2015-02-26 06:15:56 -07:00
Ms2ger
3aa03cdd4e servo: Merge #5004 - Reindent handle_click_event (from Ms2ger:handle_click_event); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: e68d6d2924bf2f6f762e2dc50b75fc32c0eafe16
2015-02-22 09:36:46 -07:00
Tetsuharu OHZEKI
d03a50553c servo: Merge #4997 - Move DocumentProgressHandler to document.rs (from saneyuki:doc); r=jdm
Fix #4987

Source-Repo: https://github.com/servo/servo
Source-Revision: b589735b47e0c8c9b008831a776a6db38b38cd5d
2015-02-21 09:24:47 -07:00
Keith Yeung
624cc237e1 servo: Merge #4999 - Moved handle_click_event from script_task.rs to document.rs (from KiChjang:refactor-handle-click-event); r=jdm
Fixes #4983

Source-Repo: https://github.com/servo/servo
Source-Revision: aad6cc03b80c3ef88439c3dc68693ddcc941ecde
2015-02-21 05:42:53 -07:00
Ms2ger
c9176a14a6 servo: Merge #4905 - Fix some warnings in script (from servo:warnings); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: b655b54f8022d963460e510511ad774a1a1d9ccd
2015-02-12 12:12:47 -07:00
Keith Yeung
c9aac69d6b servo: Merge #4845 - Moved Location object from Window to Document (from KiChjang:location-in-doc); r=jdm
Fixes #4840

Source-Repo: https://github.com/servo/servo
Source-Revision: 5c02f8956d37d39f4482c570621ffa1c61a3f41c
2015-02-05 11:54:48 -07:00
Ms2ger
7f6a9f9591 servo: Merge #4850 - Remove the Deref implementation for Root (from Ms2ger:root-deref); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: d439c0d16d6ea1449d207858705d124e191ecc13
2015-02-05 10:51:50 -07:00
Josh Matthews
21a974a25d servo: Merge #4519 - Cookie support (from jdm:cookies); r=Ms2ger
As specified in http://tools.ietf.org/html/rfc6265. Requires https://github.com/servo/cookie-rs/pull/1. Tested against http://www.joshmatthews.net/cookie.php, http://www.html-kit.com/tools/cookietester/, https://github.com/login, and https://mobile.twitter.com/session/new .

Source-Repo: https://github.com/servo/servo
Source-Revision: 7e3f504d94ffb77ec6148166d2ab73978e1c71c8
2015-02-04 11:57:54 -07:00
Gilles Leblanc
49f20e1f82 servo: Merge #4706 - Initialize trusted-ness of DOM events properly (from gilles-leblanc:issue-3740); r=jdm
Fixes #3740

Source-Repo: https://github.com/servo/servo
Source-Revision: e0d4fd35947d5ba80df26a4157c920b7b226d53d
2015-02-04 03:39:49 -07:00
Alexandru Cojocaru
24ca70cf6f servo: Merge #4820 - add unwrap to send/recv calls (from servo:send-recv); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 8e6dcc7c26d88bb0452226ff8c34539e368e03d9
2015-02-03 11:24:53 -07:00
Tetsuharu OHZEKI
39edf77177 servo: Merge #4613 - Stop using JS<T> in layout (from saneyuki:layoutjs); r=jdm
#4571

Source-Repo: https://github.com/servo/servo
Source-Revision: 462940fc2a2ba76794f37d9a6ac5af8da454aa66
2015-01-31 16:24:48 -07:00
Ms2ger
3cee792603 servo: Merge #4766 - Import the util crate as util rather than servo_util (from Ms2ger:util); r=Manishearth
This used to conflict with the util crate from the standard library, which
has long since been removed.

The import in layout has not been changed because of a conflict with the
util mod there.

Source-Repo: https://github.com/servo/servo
Source-Revision: 27e0f16407629422b5e047e067d458142372c97e
2015-01-29 05:12:49 -07:00
Josh Matthews
78741af324 servo: Merge #4719 - Update rustc to 00b112c45a604fa6f4b59af2a40c9deeadfdb7c6/rustc-1.0.0-dev (from servo:rustup_20150109); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 3f9012864a2cd927cf17a8e11dfa6922add1b7df
2015-01-27 18:15:50 -07:00
Ms2ger
190438fa42 servo: Merge #4682 - Move to to_owned rather than into_string (from servo:to_owned); r=jdm
into_string has been removed from Rust.

Source-Repo: https://github.com/servo/servo
Source-Revision: 94ebc7c32d5ce58ada3f9d8ffdb60cc025eb5997
2015-01-20 07:54:46 -07:00
Ms2ger
003cea7472 servo: Merge #4674 - Document js.rs (from Ms2ger:doc-js); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 2629445748b047434db01bee15273576e229d802
2015-01-20 04:13:01 -07:00
Matt McCoy
8fca9b5656 servo: Merge #4566 - Fixes #4164 Make Constructor and new functions take GlobalRef by value (from mattnenterprise:globalref-by-value); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 7800d98728bfa1375ad8b6a2dac7f2f35603b6d1
2015-01-08 13:12:55 -07:00
Megha Gupta
aa260a7580 servo: Merge #4495 - Add HTMLElementTypeId enum (fixes #3625) (from MeghaGupta:typeid); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 2e17cae5d080db72d5f89733d19e0304857cfd34
2015-01-04 12:12:48 -07:00
Jim Hoskins
6d9c6fe290 servo: Merge #4539 - Implement Document.defaultView - fixes #4518 (from jimrhoskins:default-view); r=jdm
Fixes: https://github.com/servo/servo/issues/4518
Source-Repo: https://github.com/servo/servo
Source-Revision: dd84ae6bfb46872dfb0f0a8dca680452dadce3f0
2015-01-03 15:51:45 -07:00
Ms2ger
3d0a04c20a servo: Merge #4526 - Move away from Root::deref (from servo:deref-1); r=Manishearth
This is a start towards fixing #3868. Not all callers have been fixed yet, so the `Deref` implementation remains for now.

Source-Repo: https://github.com/servo/servo
Source-Revision: 141b5d038fad3c0c44a6f1b309b8ca9edea54580
2015-01-02 09:22:51 -07:00
Manish Goregaokar
e0c8a4271d servo: Merge #4173 - plugins: Autogeneration of Reflectable; Inheritance lint (from Manishearth:a-more-dom-struct); r=kmcallister
Now `#[dom_struct]` also generates Reflectable impls, and there's another lint to ensure that a DOM struct only contains one bare DOM field (as the first field) or a Reflector.

A lot of this was generated by sed -- each autogenerated change has its own commit for easy review; these will be squashed later.

Source-Repo: https://github.com/servo/servo
Source-Revision: 56d1b16d1b3a18d5ffa1d9c32562d3b209851711
2014-12-27 22:12:45 -07:00
Manish Goregaokar
905ce805f5 servo: Merge #4485 - Replace most to_string calls by into_string calls (from servo:into_string); r=Ms2ger
`str::to_string()` goes through a `Formatter`, `str::into_string()` is a direct copy and is apparently 5× faster.

This is a rebase of the boring and bitrot-prone parts of #4366.

Source-Repo: https://github.com/servo/servo
Source-Revision: 9857ea26cb9ee262654bee97322dbbf373486bff
2014-12-27 06:51:44 -07:00