Commit graph

381 commits

Author SHA1 Message Date
Paul Rouget
177aa965b3 servo: Merge #9244 - mozbrowsersecuritychange event (from paulrouget:securitychange); r=jdm
Fixes #8544

No test yet. Is there a way to mock a https connection?

Also, I wish I could use the `HTTPSState` enum instead of a `String` when calling `trigger_mozbrowser_event` (https://github.com/servo/servo/compare/master...paulrouget:securitychange?expand=1#diff-30a18e04d7e0b66aafdf192e416cad44R306) but that would require `constellation_msg.rs` to know about `HTTPSState`, which is defined in `document.rs`, which would add a dependency to `components/msg`. I could define `HTTPSState` somewhere else maybe? Or maybe it's fine to use a `String`. But then, should I use the HTTPSState strings (`"modern/deprecated/none"`) or the mozbrowser strings (`"secure/insecure/broken"`) (as it is now)

Source-Repo: https://github.com/servo/servo
Source-Revision: 3d63f09361afa80b9d5c4f6b192c9bd8936094b7
2016-02-09 12:31:29 +05:01
Ms2ger
523467b043 servo: Merge #9571 - Remove the global argument to EventTarget::{fire_event, fire_simple_event} (from Ms2ger:fire); r=asajeffrey
Source-Repo: https://github.com/servo/servo
Source-Revision: 0124d90a6d1fb17a986b06825f8b3d2af0055144
2016-02-09 04:39:00 +05:01
Alexander Lopatin
6da1d8c042 servo: Merge #9543 - Fix #9508: Beautify our union enums constructors (from alopatindev:enums_constructors_codingstyle_fix); r=KiChjang
Solves #9508
@jdm Please review. Thanks!

Source-Repo: https://github.com/servo/servo
Source-Revision: 28ecb0bba3fa395ed56bb2448a21e02c3ff88c8b
2016-02-07 05:30:57 +05:01
Glenn Watson
a495c8cb58 servo: Merge #9401 - Fixes additional calls to rAF (from glennw:raf-timing); r=jdm
Often, a rAF callback will request another rAF from the callback itself.

Previously, the constellation would quickly receive two messages saying
that there were no animations, and then there are animations again in the
situation above. This would make the compositor tick the new animation straight
away, causing strange fluctuations and timings in rAF callbacks.

Instead, only send the NoAnimationCallbacks message if the animation
callback queue is still empty after invoking the callbacks.

This fixes rAF timing, which now runs at the correct (vsync) framerate.

Source-Repo: https://github.com/servo/servo
Source-Revision: bc44ae679f0d4a01194777c56e09a48fbebea1ad
2016-01-28 10:49:24 +05:01
Kishor Bhat
79a9a23449 servo: Merge #9348 - Remove unused imports in script (from therealkbhat:script-cleanup); r=Wafflespeanut
Fixes #9345.

Source-Repo: https://github.com/servo/servo
Source-Revision: 7f16b4e47bf8aef035ea788d80172dfd1a11ecff
2016-01-18 00:07:34 +05:01
Lanza
9af07af8ba servo: Merge #9334 - DOMContentLoaded event should be trusted (from MonsieurLanza:DomContentLoadedBubbles); r=KiChjang
Hopefully resolves #9332.

Source-Repo: https://github.com/servo/servo
Source-Revision: 5a954d2492195aab2f3bd5a8d2775ef5c586689d
2016-01-16 21:45:38 +05:01
Darin Minamoto
7af6d9dbee servo: Merge #9263 - Moved MouseButton from msg to script_traits (from DarinM223:move_mousebutton); r=KiChjang
Fixes #9250

Source-Repo: https://github.com/servo/servo
Source-Revision: 9118b64b4b610a95f48a88a198baac4eb31a04a0
2016-01-16 19:05:51 +05:01
Lanza
f516d45bea servo: Merge #9317 - DOMContentLoaded should bubble (from MonsieurLanza:DomContentLoadedBubbles); r=KiChjang
DOMContentLoaded event is currently set as non bubbling event.
Test :
./tests/wpt/web-platform-tests/html/syntax/parsing/the-end.html

Source-Repo: https://github.com/servo/servo
Source-Revision: 0c500a9da53145bf065804794137e2b4fc295dee
2016-01-15 06:24:12 +05:01
Joshua Holmer
511a4a2f92 servo: Merge #9295 - Move AnimationState to script_traits (from shssoichiro:move-animationstate); r=KiChjang
Resolves #9223

Source-Repo: https://github.com/servo/servo
Source-Revision: b26c7bd7ea92bdbf7cdcaa0e3d826a880b9cd0ca
2016-01-14 06:01:05 +05:01
apopiak
cb076cb7bf servo: Merge #9271 - Move MozBrowserEvent to script_traits (from apopiak:moveMozBrowserEvent_9225); r=KiChjang
close #9225

Source-Repo: https://github.com/servo/servo
Source-Revision: 897007f13447f6b34e220042e5cfd31f7686cfec
2016-01-13 23:41:48 +05:01
Matt McCoy
927dd11ffe servo: Merge #9282 - Making create attribute lowercase (from mattnenterprise:create-attribute-lowercase); r=nox
This should fix #9252. I need some help getting the test case to work correctly. I get output that "TITLE" should FAIL, but it PASS. How do I make it to where it should PASS?

Source-Repo: https://github.com/servo/servo
Source-Revision: ee5aead60bba3c6a482960021677aac3d559289b
2016-01-13 15:17:13 +05:01
Matt McCoy
dc281a0e73 servo: Merge #9265 - Moving MouseEventType from msg to script_traits (from mattnenterprise:move-mouse-event-type); r=KiChjang
Fixes #9251

Source-Repo: https://github.com/servo/servo
Source-Revision: 464b6414ce28ceb6b0674511c78da0bc751c2e31
2016-01-12 06:02:16 +05:01
GauriGNaik
f88e2a7946 servo: Merge #8972 - M1501: CSS Error Reporting: Final Steps Last Part (from GauriGNaik:expose-css-errors-1); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: a5a7a8318cbb9cc1338e9894aee61221a2fa3f27
2016-01-12 03:18:50 +05:01
Ms2ger
2b13d697b7 servo: Merge #9245 - Stop reexporting style types from layout_interface (from Ms2ger:reexports); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: 47617578af97204168fb985b956d8c85c2b9f349
2016-01-11 23:28:51 +05:01
rohan.prinja
d440ee6a41 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 15:20:04 +05:01
Guillaume Gomez
c2448b55aa servo: Merge #9146 - Generate PartialEq automatically (from GuillaumeGomez:generate_partial_eq); r=nox
r? @nox

Fixes #8804

Source-Repo: https://github.com/servo/servo
Source-Revision: 1096183cceea9ec78ab02caa33ee2d14668d977d
2016-01-04 00:08:10 +05:01
Johannes Linke
38405ee47e servo: Merge #9123 - Fix a bunch of clippy lints (from karyon:clippy_cleanup); r=Manishearth
This fixes about 130 clippy lints. Let me know if i should split up the commit.

I wasn't sure about some of the changes, especially map_or instead of map(...).unwrap_or(...) and if let instead of single arm match were not always a strict improvement in my opinion, but i'll leave that decision to the reviewer :)

There are about 150 lints left which i thought were clippy bugs or i didn't know how to fix.

cc @Manishearth

Source-Repo: https://github.com/servo/servo
Source-Revision: 9da739acefc7d1776bf727c8bf782eb79f241028
2016-01-03 08:47:34 +05:01
Simon Martin
6f8d33fe11 servo: Merge #9055 - Issue #9042: Report incorrect number of spaces around => in the style checker (from simartin:issue_9042); r=Wafflespeanut
Fixes https://github.com/servo/servo/issues/9042

Source-Repo: https://github.com/servo/servo
Source-Revision: f77c7928868469ef4f326a269147ae2aee6151ee
2015-12-24 10:26:48 +05:01
Arthur Skobara
4db2f3646f servo: Merge #9030 - Add helper method HTMLFormElement::fire_event (from askobara:refactoring-add-htmlformelement-fire_event); r=Manishearth
Fixes #8777

Source-Repo: https://github.com/servo/servo
Source-Revision: dafdc856ac3fc2bd000e61bdcaed2c024828de0c
2015-12-22 22:09:19 +05:01
vectorijk
2513404f5a servo: Merge #9036 - Implement Document charset (from KiChjang:document-charset); r=Ms2ger
Rebase of #7966.

Fixes #7718.

Source-Repo: https://github.com/servo/servo
Source-Revision: df087cc6cf4d97c5cc93befec922b38b56e6def7
2015-12-21 21:36:02 +05:01
k-cross
13e7c12ec9 servo: Merge #9025 - touchlist dom api #8225 (from k-cross:master); r=nox
Sorry for the wait, I just finished my finals.

Fixes #8225

Source-Repo: https://github.com/servo/servo
Source-Revision: 5b91daa92378d3b9fe80b2fc8f8072085d4949b3
2015-12-21 00:50:41 +05:01
Beomjin Kim
3b52036023 servo: Merge #9027 - Moved ScriptToCompositorMsg enum and EventResult enum to script_traits (from vwvww:cmrf2); r=jdm
Moved ScriptToCompositorMsg enum and EventResult enum to script_traits
resolving issue #8835.

(Need to be checked)
Variants in ScriptToCompositorMsg enum and EventResult enum had no doc
comment. I found some with grep command and copied it, and others I
wrote some doc comments manually to pass the build system. It needs to
be checked whether the doc comment is proper or not.

Source-Repo: https://github.com/servo/servo
Source-Revision: 62b11a28fa41d6665408844eb7b09d3479c4ea20
2015-12-21 00:01:03 +05:01
GauriGNaik
5be1a03fb2 servo: Merge #8971 - Add pipeline information to CSS error reporting (from jdm:expose-css-errors-1); r=jdm
Rebase of #8838.

Source-Repo: https://github.com/servo/servo
Source-Revision: d11f96e27074b0130760a02d39d2da4e003c820e
2015-12-14 21:22:41 +05:01
Corey Farwell
8c454ce7ad servo: Merge #8930 - Pass around event types as Atoms instead of Strings (from frewsxcv:event-type-atom); r=nox
`Event` internally stores the `type` as an `Atom`, and we're `String`s
everywhere, which can cause unnecessary allocations to occur since
they'll end up as `Atom`s anyways.

Source-Repo: https://github.com/servo/servo
Source-Revision: 99fd946130c9f06433b47c7f60241d5f7ad14a5b
2015-12-11 20:43:35 +05:01
Tomas Cernaj
18632570cd servo: Merge #8909 - Move ScriptMsg to script_traits crate, Fixes #8833 (from cnaj:msg_refactoring); r=jdm
Review of documentation that was missing needed.

Fixes #8833.

Source-Repo: https://github.com/servo/servo
Source-Revision: 7438bc0425749989b8aab084a34ff3fff2ea6679
2015-12-10 10:55:44 +05:01
Roman Klauke
2609215b43 servo: Merge #8855 - move FocusType enum to the script crate (from romankl:move-focus-enum); r=Ms2ger
This commit moves the FocusType enum to the script crate and replaces all usages with the new `usage`.

Fixes #8840

Source-Repo: https://github.com/servo/servo
Source-Revision: e16c930f36582f40da4736f88675f559e7e47098
2015-12-06 19:47:23 +05:01
ronak
e047c6ff80 servo: Merge #8829 - M1503 : Integrate XML Parser : First 2 of 4 Subsequent Steps (from jdm:xmlparser2); r=jdm
Rebase of #8746. Introduce and use an XML parser for text/xml network responses when loading web pages.

Source-Repo: https://github.com/servo/servo
Source-Revision: 368dd1dc53cd595bbbcf6f9fb139e9ac573a351b
2015-12-05 02:39:40 +05:01
Ms2ger
d83aa1b67c servo: Merge #8805 - Simplify drain_modified_elements a bit (from Ms2ger:drain_modified_elements); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 9c2690347232ee6a2b16e28021e494ed17a0f274
2015-12-04 19:53:54 +05:01
Ms2ger
6ce36f8878 servo: Merge #8820 - Fix warnings (from Ms2ger:warnings); r=SimonSapin
Source-Repo: https://github.com/servo/servo
Source-Revision: bb117abcd3fee0c3435cefd3d4f196345770ca69
2015-12-04 14:40:00 +05:01
Matt Brubeck
90c5caf1aa servo: Merge #8785 - Add slow path for hit testing of iframe behind positioned content layer (from mbrubeck:fixed-hit-test); r=pcwalton
Fixes browser.html blocker #8759. r? @pcwalton

This adds a slow path for cases where the compositor's layer-based hit testing is incorrect.  If the script task discovers that a mouse event should have been dispatched to an iframe, it bounces the event back to the constellation to be forwarded to the correct pipeline.

This isn't terribly slow (on the slow path, it adds one extra round-trip message between script and constellation), but if we want to optimize this better we could instead replace the compositor's layer hit testing with display list hit testing in the paint task.  This would be a more complicated change that I think we should save for a follow-up.

This only fixes mouse input for now.  A basically-identical change will be needed for touch-screen input, whether we stick with this approach or switch to the paint task.

Source-Repo: https://github.com/servo/servo
Source-Revision: bc62b5aadb62267582fbd65daa28438ce6c6ac9c
2015-12-04 02:25:22 +05:01
Corey Farwell
cec8d31e5c servo: Merge #8714 - Implement attribute 'fgColor' on 'document' (from frewsxcv:body-fgcolor); r=Ms2ger
The 'text' attribute was implemented on `<body>` in #7841

Source-Repo: https://github.com/servo/servo
Source-Revision: 65108348aa543774ade163b25836018fa8f6c00f
2015-12-01 21:11:58 +05:01
Josh Matthews
602578f515 servo: Merge #8558 - Dispatch load events for cross origin iframes. Resolves #6672 (from jdm:crossoriginiframeload); r=glennw
Splitting it out from #6677.

Source-Repo: https://github.com/servo/servo
Source-Revision: 51c19fd733a863f2fae05e693795dbecce69f2ed
2015-12-01 03:40:11 +05:01
Guillaume Gomez
e2ebe34e9f servo: Merge #8675 - Add XMLDocument object (from GuillaumeGomez:master); r=nox
Fixes #8000

(Still working on it)

Source-Repo: https://github.com/servo/servo
Source-Revision: 99223656fbf6cade8c41d161a9e61a39f58ec796
2015-11-27 19:00:04 +05:01
Manish Goregaokar
693578b06a servo: Merge #8446 - Rust upgrade to rustc 1.6.0-nightly (5b4986fa5 2015-11-08) (from servo:rustup_20151110); r=SimonSapin+Ms2ger+jdm+Manishearth
<s>DO NOT r+ or try+ this</s>

<s>It causes an OOM (https://github.com/rust-lang/rust/issues/29740) and can crash the OS. Probably will set our CI on fire. </s>

Source-Repo: https://github.com/servo/servo
Source-Revision: f13c72d68e1e7f49e241938bfd6e8a588c68e86b
2015-11-27 10:18:00 +05:01
Matt Brubeck
41c7bd5bed servo: Merge #8671 - Fix clip rect for iframes in hit testing code (from paulrouget:iframe-hit-test); r=pcwalton
Fixes #8080 r? @mrobinson

Source-Repo: https://github.com/servo/servo
Source-Revision: 8efc954531d2c7491ea01b6e22c89e35c5cf434a
2015-11-26 00:10:36 +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
Tom Schuster
c52768cb81 servo: Merge #8655 - Implement document.domain getter (from jdm:domain); r=jdm
Rebased from #6840 + test fixes.

Source-Repo: https://github.com/servo/servo
Source-Revision: 0905088e83819ada426ee6124f8c7e2d8978ea8b
2015-11-24 05:32:13 +05:01
Eli Friedman
007efab7d2 servo: Merge #8441 - Make the needs_reflow method actually work correctly (from eefriedman:needs-reflow); r=bholley
The document node is always dirty because layout never clears the bit;
instead, check the dirty bit of the root element.

Source-Repo: https://github.com/servo/servo
Source-Revision: a2be34365ae3b3e9a4f7da7a0fb5ed2dbf8426eb
2015-11-22 05:15:08 +05:01
Corey Farwell
142c7b7efe servo: Merge #8622 - Implement 'url!(..)' macro (from frewsxcv:url-plugin); r=SimonSapin
https://github.com/servo/rust-url/issues/136

https://github.com/servo/rust-url/pull/137

Source-Repo: https://github.com/servo/servo
Source-Revision: ea690a2dff64d1cb4eb668473d62f1bbcb19f7c8
2015-11-21 20:41:52 +05:01
Keith Yeung
5b3f4b220a servo: Merge #8530 - Split ConstellationMsg into ScriptMsg and CompositorMsg (from KiChjang:split-constellation-msg); r=jdm
Fixes #8356.

Source-Repo: https://github.com/servo/servo
Source-Revision: acbe41305230a926458596444ca955eff063d9dd
2015-11-19 04:10:20 +05:01
Ms2ger
f0af48c824 servo: Merge #8569 - Rustfmt some of script (from Ms2ger:fmt-script); r=metajack
Source-Repo: https://github.com/servo/servo
Source-Revision: 7a87312121a69b590b364f9b5095f3145554e24b
2015-11-18 15:15:30 +05:01
Ms2ger
e0b4ad2928 servo: Merge #8548 - Remove the unused arguments to hit_test and mouse_over (from Ms2ger:unused-tna); r=pcwalton
I don't think this code is called when there is no document element, but I
added assertions to make sure we notice in case I was wrong.

Source-Repo: https://github.com/servo/servo
Source-Revision: 20d26853e145e275695463662b6cee334cd27085
2015-11-17 01:36:52 +05:01
Greg Guthe
c64559414c servo: Merge #7242 - Perf timing dom props (from g-k:perf-timing-dom-props); r=jdm
I think this is closer to what https://github.com/servo/servo/issues/7045 describes, but it panics trying to load a page (trace: https://gist.github.com/g-k/a9911467889cdb6fdbf9) and all reftests fail.

Source-Repo: https://github.com/servo/servo
Source-Revision: 7de8b0a7ff2038f9fb643141d8759f40fb6ef093
2015-11-14 10:57:23 +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
Josh Matthews
e29664aa5b servo: Merge #8430 - Invoke specialized callback behaviour for OnErrorEventHandler (from jdm:errorhandler); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: fafc280179ddafab878dd261121cee17ba3b921c
2015-11-13 03:25:00 +05:01
Bobby Holley
6c48a45939 servo: Merge #8381 - Implement attribute restyle hints (from bholley:attr_restyle_hints); r=pcwalton
Source-Repo: https://github.com/servo/servo
Source-Revision: 13226f847234cd0130820338d5a272277780d278
2015-11-11 00:58:45 +05:01
Alan Jeffrey
5b61974f7a servo: Merge #8227 - Versioned dom (from asajeffrey:versioned_dom); r=eefriedman
This PR adds versioning to the DOM. There are now node.get_version and node.get_descendent_version methods that return a counter that is bumped when the node is dirtied. This is used to implement cache invalidation for caching HTMLCollection state. Caching HTMCollections gets a 1000x speedup in the Dromaeo DOM query tests.

Addresses https://github.com/servo/servo/issues/6901, https://github.com/servo/servo/issues/3381 and https://github.com/servo/servo/issues/1916.

Replaces PR https://github.com/servo/servo/pull/6927.

Source-Repo: https://github.com/servo/servo
Source-Revision: f39faaf99471f5419710e1a3d434e5d5fab0d221
2015-11-10 00:42:23 +05:01
Eli Friedman
d1d6ecbdd2 servo: Merge #8404 - Misc cleanup for DOM attributes (from eefriedman:misc-attributes); r=nox
No functional change; just cleanups related to parsing attributes.

Source-Repo: https://github.com/servo/servo
Source-Revision: d8df028197505ca439363cdb05bed58fe9b4b726
2015-11-10 00:03:24 +05:01
Corey Farwell
ad2721d49c servo: Merge #8403 - Minor 'node_from_nodes_and_strings' cleanup (from frewsxcv:node-from-nodes-and-strings); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: fc98b8e126b9f14229d677ea49b3afa819aa6910
2015-11-08 17:04:46 +05:01
Till Schneidereit
6b102412c1 servo: Merge #8039 - Move Stylesheet loading and ownership from the layout task into HTML elements (from tschneidereit:script-owns-stylesheets); r=jdm
Stylesheets for `HTMLLinkElement`s are now loaded by the resource task, triggered by the element in question. Stylesheets are owned by the elements they're associated with, which can be `HTMLStyleElement`, `HTMLLinkElement`, and `HTMLMetaElement` (for `<meta name="viewport">).

Additionally, the quirks mode stylesheet (just as the user and user agent stylesheets a couple of commits ago), is implemented as a lazy static, loaded once per process and shared between all documents.

This all has various nice consequences:
 - Stylesheet loading becomes a non-blocking operation.
 - Stylesheets are removed when the element they're associated with is removed from the document.
 - It'll be possible to implement the CSSOM APIs that require direct access to the stylesheets (i.e., ~ all of them).
 - Various subtle correctness issues are fixed.

One piece of interesting follow-up work would be to move parsing of external stylesheets to the resource task, too. Right now, it happens in the link element once loading is complete, so blocks the script task. Moving it to the resource task would probably be fairly straight-forward as it doesn't require access to any external state.

Depends on #7979 because without that loading stylesheets asynchronously breaks lots of content.

Source-Repo: https://github.com/servo/servo
Source-Revision: 7ff3a17524e0e703e3ac279441729c185444be24
2015-11-08 00:42:54 +05:01
Michael Howell
42386325c6 servo: Merge #8296 - Prepend, rather than append, SVG title elements (from notriddle:svg_title_prepend); r=nox
Fixes #8164

Source-Repo: https://github.com/servo/servo
Source-Revision: 3c794d0076d9f68754865c1fdaa7d2e6055bc777
2015-11-07 13:44:42 +05:01
Bobby Holley
577687c224 servo: Merge #8341 - Fix restyle hints to handle non-last psuedo-selectors, and track pristine state values rather than changesets (from bholley:state_hint_selector_ordering); r=pcwalton
Source-Repo: https://github.com/servo/servo
Source-Revision: 65c3185b202b8dd57a39e1d84872d7528723b191
2015-11-07 09:24:19 +05:01
Josh Matthews
6413df2894 servo: Merge #8326 - Send mouse move events to the the previous layer when directing event… (from jdm:iframehover); r=glennw
…s to a new one for the first time. Resolves #7865.

Source-Repo: https://github.com/servo/servo
Source-Revision: 4067960ba5d309ec6c4c6aef6e7aa231aca0e5d5
2015-11-06 05:55:59 +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
David Zbarsky
ed7fd17b12 servo: Merge #8305 - Get rid of a bunch of explicit derefs (from dzbarsky:roots); r=Ms2ger,
Source-Repo: https://github.com/servo/servo
Source-Revision: 4b9fa13f2f6a1aa38d180367426498f01f6414c9
2015-11-04 10:34:54 +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
Matt Brubeck
4b6e081f7b servo: Merge #8232 - Correct event dispatching for multiple simultaneous touch points (from mbrubeck:glutin-touch); r=glennw
Instead of just converting the mouse into a single "touch" input, Servo can now listen for multi-touch events from Glutin, maintain a list of active touch points, and dispatch events for all of them.

r? @glennw (for the compositor changes) and @jdm (for the DOM changes)

Source-Repo: https://github.com/servo/servo
Source-Revision: 3fdaa6e3f32f6996c416e75119177b98d404adb2
2015-11-03 22:16:21 +05:01
Alan Jeffrey
690f25f37c servo: Merge #8087 - Removced unncessary call to dirty() in Document::node_and_heritage_ch… (from asajeffrey:dont_dirty_twice); r=pcwalton
Removed unncessary call to dirty() in Document::node_and_heritage_change, since the node is aready dirtied by force_dirty_ancestors().

Source-Repo: https://github.com/servo/servo
Source-Revision: 23efa0a36f22bc1ba06023892d7cb292f5899275
2015-11-03 20:35:39 +05:01
Eli Friedman
3d84958c1f servo: Merge #8056 - Fix the implementation of JSTraceable for RefCell (from eefriedman:trace-refcell); r=jdm
The existing implementation could panic; make sure that doesn't
happen by requiring that the contents of a RefCell are trivially
traceable (i.e. the value don't contain any traceable objects).

I'm not sure whether the TriviallyJSTraceable trait is actually
worthwhile; maybe we should just never use RefCell in the DOM.

Source-Repo: https://github.com/servo/servo
Source-Revision: 4f51710ed387baa1ad0a6e4cdb0fc5eee44093d5
2015-11-03 06:38:40 +05:01
Ms2ger
22148e83d8 servo: Merge #8282 - Cleanup Document::handle_mouse_move_event a bit (from Ms2ger:handle_mouse_move_event); r=Manishearth
Source-Repo: https://github.com/servo/servo
Source-Revision: 912359fcbd74ddfdfa7aaf11f28cc8c2cfbd0eac
2015-10-31 18:28:31 +05:01
nxnfufunezn
cba28409a5 servo: Merge #8262 - Removed JS::root #8251 (from nxnfufunezn:Remove_JS_root); r=Ms2ger
Fixes #8251

r? @Ms2ger

Source-Repo: https://github.com/servo/servo
Source-Revision: 37c03c78165fbb77eb024f2c3376d5e33cd7e446
2015-10-31 17:55:23 +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
rohan.prinja
258086b9fa servo: Merge #8250 - remove get_rooted() and replace all references to it with references … (from ajnirp:8246-remove-get-rooted); r=Ms2ger
…to get()

for #8246

Source-Repo: https://github.com/servo/servo
Source-Revision: 00b60b93860d32e1c5aaf0f9b4a2ce5110880652
2015-10-30 06:08:44 +05:01
Bobby Holley
b3fb877c87 servo: Merge #8098 - Track event state changes on Document and do the dirtying from layout (from bholley:dirty_from_layout); r=jdm
This is a first step in fixing #6942.

Source-Repo: https://github.com/servo/servo
Source-Revision: 285e29c06637f31a8b8a27c2e454468717924ebd
2015-10-28 23:55:53 +05:01
Axel Solis Trompler
64b55b1241 servo: Merge #8169 - Implement document.createEvent(TouchEvent) (from ax3lst:master); r=eefriedman
This solves #8160

Source-Repo: https://github.com/servo/servo
Source-Revision: 7c9f4644f3f5849a68a0575c755d9cb5619c86dc
2015-10-28 05:26:03 +05:01
Rohan Prinja
83a9340c66 servo: Merge #8217 - remove DocumentProgressTask enum (from ajnirp:8211-remove-documentprogresstask); r=Manishearth
for #8211

Source-Repo: https://github.com/servo/servo
Source-Revision: a6e2c138db156a7b817107b22c482010ebcdcf2a
2015-10-27 00:12:02 -05:00
Till Schneidereit
f0ce107fb5 servo: Merge #7979 - Improve spec-compliance of script loading and execution during document startup (from tschneidereit:script-loading-fixes); r=jdm
Including proper support for async and deferred scripts.

r? @jdm

Source-Repo: https://github.com/servo/servo
Source-Revision: 704c5ef25a846ac4321cd136d9747dee9513f98b
2015-10-26 15:48:23 -05:00
Corey Farwell
a62d22ef7f servo: Merge #8178 - Implement a couple attributes for <label> elements (from frewsxcv:label); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: af8a1cb8a03e661f27c738512254a8f31915f3ba
2015-10-26 09:51:56 -05:00
Corey Farwell
809309e229 servo: Merge #8181 - Remove unnecessary allocation with getElementById (from frewsxcv:no-alloc-get-element-by-id); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: 3b50f219631ee8b8746199ef2bc1d60c716295ea
2015-10-24 17:25:09 -05:00
Matt Brubeck
a4f7ce3218 servo: Merge #7204 - Very basic touch events and touch scrolling (from mbrubeck:touchevent); r=jdm
This implements just enough of [Touch Events](http://w3c.github.io/touch-events/) to enable scrolling on Android without regressing basic single-touch interaction like clicking on links.

Dragging a page will scroll it, unless the page calls `preventDefault` on the "touchstart" event.

Does **not** yet support pinch zooming or other multi-touch gestures or events.

Includes a `-Z convert-mouse-to-touch` command line flag for testing on non-touch platforms.  This is also enabled by default on Android because Glutin currently translates touch input to mouse events on Android.

Source-Repo: https://github.com/servo/servo
Source-Revision: dcd207f9bf15c9ecf5d043385ba93277e69201f6
2015-10-22 15:54:01 -06:00
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
Anthony Ramine
1c1210fbba servo: Merge #8060 - Implement Deref<Target=T> for JS<T> where T: Reflectable (from nox:deref-js); r=Ms2ger
We can only borrow `JS<T>` from rooted things, so it's safe to deref it.
The only types that provide mutable `JS<T>` things are `MutHeap<JS<T>>` and
`MutNullableHeap<JS<T>>`, which don't actually expose that they contain
`JS<T>` values.

Source-Repo: https://github.com/servo/servo
Source-Revision: 1a376aa75d5de8781b17a673850860f8afd2c28f
2015-10-19 06:32:05 -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
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