Commit graph

364 commits

Author SHA1 Message Date
benshu
bf2e0302a8 servo: Merge #8603 - Timers clean up (from benschulz:timers-clean-up); r=jdm
This PR splits the `ActiveTimers` abstraction into

 - `OneshotTimers` for scheduling "arbitrary" oneshot timers, such as XHR timeouts, and
 - `JsTimers`, based on `OneshotTimers`, for scheduling JS timers (`setTimeout`/`setInterval`).

The result is mich cleaner and the timer initialization steps now closely resemble the specification.

**Notes**
 - The second and third commit are strictly renames and code rearrangements.
 - I'm not particularily happy with the `OneshotTimerCallback` enum and its circular dependency with `XHRTimeoutCallback`, but I couldn't come up with anything better.

Source-Repo: https://github.com/servo/servo
Source-Revision: 8f278109ce84aa482ccc0d25938970435fb6e536
2016-02-21 21:14:28 +05:01
Ms2ger
de2a28770a servo: Merge #9603 - Store a pointer to the browsing context in the Document (from Ms2ger:document-bc); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: ee158cc65f117f8fa10c4b706ff4009c579c7775
2016-02-19 12:20:35 +05:01
Kamil Muszyński
d1164e9d59 servo: Merge #9576 - Issue #9561 Renamed *_thread_source to *_task_source window.rs (from kmuszyn:9561-rename-thread-to-task); r=jdm
Related to: https://github.com/servo/servo/issues/9561

Renamed *thread_source to *_task_source in components/script/dom/window.rs and files that use window methods.

Source-Repo: https://github.com/servo/servo
Source-Revision: c929dbe2530f979ce6e84d5a25ea47318ff0910e
2016-02-14 19:33:58 +05:01
Josh Matthews
e0ee460aad servo: Merge #8987 - Report CSS errors to script task for further processing (from jdm:devtoolsreport); r=glennw
This was a missing piece from #8838.

Source-Repo: https://github.com/servo/servo
Source-Revision: b870aa90878acf97074fa55260beb8acfd125f22
2016-02-12 01:16:58 +05:01
Emilio Cobos Álvarez
83aa64a599 servo: Merge #9510 - Update rust-selectors (from nox:bump-selectors); r=SimonSapin
This commits updates rust-selectors to use the generic parser, and as
such it moves the element state into the style crate.

Source-Repo: https://github.com/servo/servo
Source-Revision: ae20f2556bc7807b39b6649ac1f738644abcc26a
2016-02-03 06:35:11 +05:01
Josh Matthews
ad47e88950 servo: Merge #9421 - compositing: Fix a couple of bugs that prevented iframes from painting after navigation (from jdm:iframe-painting-after-navigation-redux); r=jdm
The first bug was that iframes were not reflowed in their parent DOM when the child page navigated. This is fixed by simply having the constellation notify the appropriate script thread when navigation occurs.

The second bug was that the compositor was unable to adjust the pipeline for existing iframe layers, only new ones. This patch adds logic to do that.

The third bug was that we have ad-hoc reflow calls throughout script/, and we didn't trigger any reflow from the code that dispatches the `load` event for the iframe so the test for the first two issues would always time out. The second commit adds another reflow call to do that, and also bites the bullet and adds a catch-all reflow (which does nothing if there's no dirty nodes in the document) at the return to the event loop.

Closes #8081.

Extension of #9285.

Source-Repo: https://github.com/servo/servo
Source-Revision: 0fa9d32c6915c9cad18e5430c10973399599458a
2016-01-28 04:26:04 +05:01
Corey Farwell
a33c94d362 servo: Merge #9328 - Fix broken spec link on Window::Document (from frewsxcv:window-broken-link); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: c7e86411746d229b1f5d43ca55875f7ddda9145a
2016-01-15 08:40:40 +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
Brandon Fairchild
e8e2b2b80a servo: Merge #9279 - Move DocumentState to script_traits (from nerith:documentstate); r=nox
Fixes #9224.

Source-Repo: https://github.com/servo/servo
Source-Revision: cbb5a0d8726313545d95fe0261145a5350857e93
2016-01-13 02:29:32 +05:01
Chad Kimes
9899b01934 servo: Merge #9255 - Remove global fields from DOM objects (from ckimes89:remove-globalfield); r=nox
Fixes #9227

Source-Repo: https://github.com/servo/servo
Source-Revision: 53c4a782a0906c487139d4b6f3c62d9eca3f9f17
2016-01-12 18:03:37 +05:01
Bobby Holley
97c1afa558 servo: Merge #9261 - Remove the msg dependency from style (from bholley:geckolib_nomsg); r=Manishearth
This is part of slimming down the dependencies of geckolib.

Source-Repo: https://github.com/servo/servo
Source-Revision: 3680e82cab766a412a969a21c0cdff0c7f97d7bc
2016-01-12 08:54:31 +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
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
Keith Yeung
f554384bc4 servo: Merge #8871 - Add 5 different task source channels (from KiChjang:task-source-channels); r=KiChjang
This is **not** complete. I really need feedback right away since I felt that the direction I'm heading is very wrong.

Partial #7959.

Source-Repo: https://github.com/servo/servo
Source-Revision: b8e7cd71d6aada507a7eab1ddad44181b0d2d029
2016-01-01 14:02:51 +05:01
Brandon Fairchild
845411a627 servo: Merge #8938 - Move LayerKind and ScrollPolicy enums to gfx_traits (from nerith:gfx); r=Ms2ger
Fixes #8836.

Source-Repo: https://github.com/servo/servo
Source-Revision: 68c4f290c7c9ad7ea45fcea66e3c6b172e42be62
2015-12-23 18:09:51 +05:01
Simon Martin
853fce7a0a servo: Merge #8863 - Issue #8352: Dispatch mozbrowsershowmodalprompt event for alert() (from simartin:issue_8352); r=jdm
Fixes https://github.com/servo/servo/issues/8352

Source-Repo: https://github.com/servo/servo
Source-Revision: 9a4d82c314754d377edb0ef6b87873076bf3c057
2015-12-21 01:59:32 +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
Glenn Watson
7ead86e251 servo: Merge #8612 - Add test to constellation to avoid writing reftest image if there are pending frames (from glennw:pending-frames); r=jdm
This changes several tests that contain <iframe></iframe> from FAIL to TIMEOUT. This is correct
since there is a bug that prevents these iframes from ever rendering.

~~~There are also a few previous FAILs that changed to OK. These may be intermittents or they
may genuinely be fixed by this change.~~~

Source-Repo: https://github.com/servo/servo
Source-Revision: c6ae32abdde715dbdc3097a40ab7abdbc98cf4b0
2015-12-17 15:50:16 +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
Ms2ger
1e2a317f1b servo: Merge #8942 - Rename the browsercontext module (from Ms2ger:rename-bc); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: f4783a0ec30c74f93c161372de806309900172ca

--HG--
rename : servo/components/script/dom/browsercontext.rs => servo/components/script/dom/browsingcontext.rs
2015-12-12 13:49:25 +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
Florian Strübe
3cce77e3f2 servo: Merge #8862 - Moved WorkerId type to devtools_traits (from fstr:move_workerid); r=Ms2ger
Fixes #8846.

Source-Repo: https://github.com/servo/servo
Source-Revision: 02f4be9c9f82a6e03942977eece39d98dcaff839
2015-12-08 00:24:40 +05:01
Keith Yeung
59f2bc1dcd servo: Merge #8853 - Split fn script_chan into 5 different task channel fn (from KiChjang:generic-task-sources); r=jdm
Partial #7959.

Source-Repo: https://github.com/servo/servo
Source-Revision: ef000a458a52051b55b65e254ff9fe1a55835d04
2015-12-07 07:17:10 +05:01
GauriGNaik
5b0ca679ad servo: Merge #8682 - Defined new trait ParseErrorReporter and added error_reporter member … (from jdm:css-error-reporter); r=jdm
…to ParserContext.

Rebase of #8210.

Source-Repo: https://github.com/servo/servo
Source-Revision: f5ef2f4f75cd58a3c6f1f123e413dc9d3a24f841
2015-11-27 03:27:08 +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
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
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
Patrick Walton
2d74e05b04 servo: Merge #8492 - script: Make timer events e10s-safe (from jdm:e10s-timer-events); r=jdm
Closes #8235.

Source-Repo: https://github.com/servo/servo
Source-Revision: 9eaa8e7b1f2e462f62b73477c30183c836a18399
2015-11-13 04:50:48 +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
Ms2ger
3890fca29d servo: Merge #8428 - Update js (from Ms2ger:conversions); r=Manishearth
Source-Repo: https://github.com/servo/servo
Source-Revision: b40882093a306032d38ad02e30f0095e0a49ec21
2015-11-13 00:44:52 +05:01
Anthony Ramine
b98af75b92 servo: Merge #8197 - Support variadic interface arguments (fixes #8159) (from nox:variadic-interface-argument); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: f03a8261c58f650eda789b1f9f5363af6e15f59c
2015-11-11 19:03:26 +05:01
benshu
af0bc728ee servo: Merge #8168 - XHR timeouts use same abstraction as scripts timers. (fixes #3396) (from benschulz:xhr-timeout-ordering); r=jdm
Alright, this is it. Finally the fix for #3396. :D

I'll add two comments via reviewable in a second.

Source-Repo: https://github.com/servo/servo
Source-Revision: df81cd7ce9de4823ad966f873639ed06ca368e4c
2015-11-11 05:39:28 +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
David Zbarsky
e69242f014 servo: Merge #8304 - Cleanup some unneeded let bindings (from dzbarsky:borrowck); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 69e6eb4d91ab1bd8f363ee7425e4f921ca006a1e
2015-11-07 01:02:40 +05:01
Josh Matthews
a341dc56b0 servo: Merge #8138 - Implement cancellable runnables, and make image load events cancellab… (from jdm:createelementintermittent); r=nox
…le. Resolves #7731.

Source-Repo: https://github.com/servo/servo
Source-Revision: 4113302c262dc4fedb67a6d6d68284f14fe9b9bc
2015-11-06 23:07:57 +05:01
Ms2ger
8ed2253990 servo: Merge #8332 - Remove obsolete comment (fixes #8209) (from Ms2ger:8209-comment); r=frewsxcv
Source-Repo: https://github.com/servo/servo
Source-Revision: 1dc144d1687cc6d89b29be859454e7ef73fb341d
2015-11-05 05:56:54 +05:01
Ms2ger
e3673bb2cc servo: Merge #7128 - Make BrowsingContext JS-managed (from Ms2ger:bc-root); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: b4d234107e7fcc02e88915f37c06bf651842c1dd
2015-11-04 22:09:51 +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
Ms2ger
0df5833603 servo: Merge #8239 - Remove unused code around ScriptReflow (from Ms2ger:ScriptReflow); r=pcwalton
Source-Repo: https://github.com/servo/servo
Source-Revision: 9a800becdf7f6b3b3524d204485cb7c593b506f5
2015-11-03 15:00:17 +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
Olivia Nordquist
5a05de931c servo: Merge #8290 - Un-boxed ScriptReflow (from itsmeolivia:store-script-reflow); r=Ms2ger
As per #8238 I changed `layout_interface::Msg::Reflow` to store `ScriptReflow` rather than `Box<ScriptReflow>`

I ran the tests and believe everything passed but this is my first commit to the project so sorry if I messed up the protocol!

Source-Repo: https://github.com/servo/servo
Source-Revision: 601169c0e5b0207805bb316b21e556f5ab67df9b
2015-11-01 14:21:17 +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
Ms2ger
ce05956312 servo: Merge #8155 - Remove Window::layout_join_port (from Ms2ger:join); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 4d737b51bb2053e9bb970b31b0516ac8810a061b
2015-10-23 04:50:38 -06:00
benshu
7eac66ba86 servo: Merge #7450 - Ordering guarantees for timers (from benschulz:constellation-timer); r=jdm
This is an rough solution to the issue described in #3396. XHRs still do their own thing and an overall clean up is in order. Before I do that, though, I'd really like someone to sign off on the overall idea.

There's one major difference to what jdm layed out #3396: The timers remain with the window/worker and only the earliest expiring one is coordinated with the dedicated timer thread.
That means both the timer thread and the window/worker have to keep track of which timer expires next, which feels a bit wonky. However, the upshot is that there's no need for communication with the timer thread when a pipeline is frozen, thawed or dropped.

Most relvant parts are
 - the [`TimerScheduler`](6f5f661958 (diff-74137a6f50ab38e7a1e4d16920a66ce7R73)), which is the new per-constellation timer task and
 - the [`ActiveTimers`](6f5f661958 (diff-86707d952414a2860b78bcf6c1db8e2eR34)) which is what's left on the window/worker side.

Source-Repo: https://github.com/servo/servo
Source-Revision: 2de5407cdabef67ed03b2ad4edf4a22541d77875
2015-10-21 09:07:30 -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
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
KALPESH KRISHNA
487d7a4093 servo: Merge #8038 - Adding window.onstorage WindowEventHandler (from martiansideofthemoon:my-code-fix); r=jdm
Well it built successfully this time around 😄 @jdm . Working to solve #7994

Source-Repo: https://github.com/servo/servo
Source-Revision: 23fa9de714662286480b26b28b742a7e23bc91f4
2015-10-17 22:36:13 -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
Michael Wu
e4dfd5fc9a servo: Merge #7727 - Support the updated spidermonkey bindings (from michaelwu:update-bindings); r=jdm
Still need to finish the rust-mozjs update and make cargo use it, but it's close enough that I don't expect much to change on the servo side.

Some changes here
- bools are properly translated now
- char16_t is handled as u16 now
- JS_GlobalObjectTraceHook isn't mangled now
- JSJitInfo has been adjusted
- A const fn is used to generate bitfields in JSJitInfo
- Manually generating handles now requires calling an unsafe function. It's not actually required, but it's too much of a hassle to generate them manually now due to bindgen++ adding base classes now.

Source-Repo: https://github.com/servo/servo
Source-Revision: b34fd5bd7e55be1d577df5cf70b41af8a6cc716b
2015-10-14 14:48:44 -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
Corey Farwell
795e875ef6 servo: Merge #7960 - Replace usage of old-style WHATWG spec links (from frewsxcv:update-spec-links); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 4052a22a1c6826cb18f03de9d2f6aed82d809e71
2015-10-10 10:17:52 -06:00
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
Glenn Watson
40d2827806 servo: Merge #7795 - Split Au type into separate crate, with minimal dependencies (from glennw:app-units-crate); r=SimonSapin
Source-Repo: https://github.com/servo/servo
Source-Revision: 35888e5a1d48511ec54ddf8c58f1c7b0c47c5d3c
2015-09-30 15:19:33 -06:00
Patrick Walton
da504ba30c servo: Merge #7596 - layout: Load Web fonts asynchronously (from pcwalton:async-web-font-loading); r=mbrubeck
Improves page load times significantly.

Closes #7343.

Source-Repo: https://github.com/servo/servo
Source-Revision: 7933b484300131d3de79edbcf399288b22010616
2015-09-28 12:11:50 -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
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
Ms2ger
7b02289360 servo: Merge #7628 - Emit markers for all events, not just UI events (from Ms2ger:events-markers); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: df083ccb528f2997fbea4724fcd463104bf8d87d
2015-09-16 08:34:32 -06:00
Anthony Ramine
6953aa403a servo: Merge #7606 - Move the type_id fields to DOMClass (from nox:move-typeid); r=jdm
Cc @michaelwu.

Source-Repo: https://github.com/servo/servo
Source-Revision: d5ee58caf269779e86b2efc50ddf37d3e4eba9b9
2015-09-13 11:53:42 -06:00
Corey Farwell
503d9bf6ec servo: Merge #7613 - Minor script::dom:🪟:Window cleanup (from frewsxcv:minor-window-cleanup); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: a63e2935ed7847442aae995237396da117a2c53b
2015-09-12 08:05:18 -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
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
farodin91
d45cce0ef0 servo: Merge #7500 - Implement viewport functions for window #1718 (from farodin91:viewport); r=jdm
@jdm r?
closes #6875

Source-Repo: https://github.com/servo/servo
Source-Revision: a844c0b0e8ca26e3bd76a42616e406fad8f7e5a5
2015-09-01 21:31:25 -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
Ms2ger
87fd899fef servo: Merge #7435 - Send the start and end half of a TimelineMarker to the devtools … (from Ms2ger:markers); r=jdm
…PullTimelineMarkers thread together.

Source-Repo: https://github.com/servo/servo
Source-Revision: b68b31a062c245684c3b41132c568fd3836fb30c
2015-08-28 13:51:32 -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
David Zbarsky
44b7abeb51 servo: Merge #6880 - Don't try to unwrap the result of requestAnimationFrame callback (from dzbarsky:rAF); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 186c1d14d5b5fd8e9fcd5147d47ebe998dfe45cd
2015-08-26 08:13:11 -06:00
Mahdi Dibaiee
8b97bb22af servo: Merge #7288 - Fix #7268 - getComputedStyle should take Element, not HTMLElement (from mdibaiee:computedstyle-element); r=Ms2ger
This is my first patch, I hope I'm doing it right.

About the test, do you think this is enough and reliable?

Source-Repo: https://github.com/servo/servo
Source-Revision: 6e06cae44a151e252e9df5368c2a9e770fb4d3d5
2015-08-22 20:43:45 -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
Manish Goregaokar
d4e45231ec servo: Merge #7224 - Integrate clippy into Servo; cleanup some of script (from Manishearth:clippy); r=Ms2ger
The integration is off by default for now. You can try it out with `./mach build --features "script/plugins/clippy"`.

We're using a branch of clippy with some of the lints changed to Allow, either because they don't apply to us, or because they're noisy and dwarf other warnings (but still should be fixed)

After going through the rest of Servo's warnings I'll figure out which lints we should be keeping.

There's a cargo bug with optional deps that makes it hard for this to work with Cargo.lock -- so this PR contains no changes to lockfiles (and running the build with clippy on may dirty the lockfile, though it gets fixed later)

Source-Repo: https://github.com/servo/servo
Source-Revision: 50e1c967e4299c1515575f73d407f5f6b977d818
2015-08-18 08:15:51 -06:00
wartman4404
32b9ffffdb servo: Merge #7244 - Remove the DOMRefCell wrapper around Window::compositor (from wartman4404:master); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: 3bb930661d06c864e17374bfd1f0b0f4d06d7253
2015-08-16 16:52:01 -06:00
Josh Matthews
6a81d499fc servo: Merge #7203 - Add automated style nit checks to test-tidy (from jdm:style); r=Ms2ger
Expands on the work by @wilmoz and cleans up the existing errors. Closes #7180. Closes #7111.

Source-Repo: https://github.com/servo/servo
Source-Revision: e74825f9fde8e222f4ba9bb24b2c2a3864c73e5f
2015-08-16 08:37:40 -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
Ravi Shankar
35668fd5a5 servo: Merge #7006 - Splitting ScriptMsg into various enums (from Wafflespeanut:script_cleanup); r=jdm
... for #3734, which is also one of the oldest issues. (/cc @jdm)

Source-Repo: https://github.com/servo/servo
Source-Revision: 6a52ec94840fbaf43a29d76879e2b59542a9963d
2015-08-15 03:48:47 -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
Ms2ger
4d27b093e6 servo: Merge #7176 - Merge the fragment handling into handle_navigate (from Ms2ger:navigate-fragment); r=jdm
This is handled in the 'navigate' algorithm in the specification.

Source-Repo: https://github.com/servo/servo
Source-Revision: e44ae6404fd25ed51a543141ca8f9cc2a3443817
2015-08-12 12:22:47 -06:00
Ms2ger
da9bb62e1d servo: Merge #7171 - Remove ScriptControlChan (from Ms2ger:ScriptControlChan); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 3ad49fc689ceb6067cd6dea1aa0d004321704b8e
2015-08-12 08:28:29 -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
Ms2ger
1dc4f2b93a servo: Merge #7027 - Lock stderr while printing the alert() message (from Ms2ger:lock-stderr); r=jdm
2a7f262b7df8761261a0fa618394f4e991733a5e was unsufficient for the case where
the interleaved output was actually on stderr rather than stdout, such as
output from the error macro.

Source-Repo: https://github.com/servo/servo
Source-Revision: 522ebe7a3bd55d4572b670fa32ffc9979b3f7a74
2015-08-06 12:46:31 -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
Glenn Watson
b4bfd1bd03 servo: Merge #6784 - Implement offsetParent/Top/Left/Width/Height (from glennw:offset-ext); r=pcwalton
Source-Repo: https://github.com/servo/servo
Source-Revision: d66c59a15213dec17f38af0653e9e7e1bf579a95
2015-08-03 18:39:43 -06:00
Ms2ger
d66f8c44ec servo: Merge #6917 - Lock and flush stdout in Window#alert (from Ms2ger:lock-alert); r=metajack
We use alert() to communicate test results to wptrunner. Unfortunately,
sometimes the alert output is interleaved with other output on stdout,
causing wptrunner to classify the test result as a timeout. I hope this will
avoid that scenario.

Source-Repo: https://github.com/servo/servo
Source-Revision: 86476804cac668133b6964c8f551918163aa66d7
2015-08-03 13:17:47 -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
David Zbarsky
c4655740ea servo: Merge #6798 - Implement getComputedStyle (from dzbarsky:gCS); r=pcwalton
It's not quite done but can probably be reviewed anyway.
I still need to finish up a few of the ToCss impls, I just got lazy and wanted to make sure things worked.

The computation of the used values is definitely not right, I'm going to investigate that.

Source-Repo: https://github.com/servo/servo
Source-Revision: acbca7b3aaf18866f7a1a79d9684149897bf4305
2015-07-29 18:48:45 -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
Till Schneidereit
372ef0fcd0 servo: Merge #6662 - Implement Element.client{Top,Left,Width,Height} (from tschneidereit:client-geometry); r=glennw,pcwatson
This isn't done, but contains a working implementation of at least `clientTop`. Feedback would be much appreciated: it's probably far from ideal.

Implementing `clientLeft` is straight-forward, I think, but `clientWidth` and `clientHeight` require accessing the `border_box` - and I don't know how that works, yet.

Source-Repo: https://github.com/servo/servo
Source-Revision: e0bd80f80715bdbdf30de1de9c79a99a41cfd99e
2015-07-27 20:45:05 -06:00
Patrick Walton
8325a09ce0 servo: Merge #6745 - devtools: Convert the developer tools to run over IPC (from pcwalton:devtools-ipc); r=jdm
This was a large, invasive change.

r? @jdm

Source-Repo: https://github.com/servo/servo
Source-Revision: 4bc1db3fe85f2a1a04536f0f6045b53b1319f4bc
2015-07-27 11:09:38 -06:00
Ms2ger
9c852f72e0 servo: Merge #6781 - Remove unused method Window::handle_resize_inactive_msg (from Ms2ger:handle_resize_inactive_msg); r=saneyuki
Source-Repo: https://github.com/servo/servo
Source-Revision: 380de1ba821140b180ef137796e5c3097a953c11
2015-07-26 20:55:40 -06:00
Tetsuharu OHZEKI
0ff8cdf987 servo: Merge #6675 - Implement Window.trap() to trigger a breakpoint trap (from saneyuki:trap); r=Ms2ger
Fix #6673

Source-Repo: https://github.com/servo/servo
Source-Revision: 20d8c275d747d6d8e3ce6f65c3ea592e2015d2ea
2015-07-20 10:20: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
45366270f1 servo: Merge #6593 - compositing: Make the constellation messages serializable (from pcwalton:constellation-ipc); r=jdm
Same idea as before. This depends on:

* https://github.com/servo/euclid/pull/94
* https://github.com/hyperium/hyper/pull/603

r? @jdm

Source-Repo: https://github.com/servo/servo
Source-Revision: 2f4bdc6ad631dc56b64622e3390943b59270b3ae
2015-07-18 07:43:24 -06:00
Nicholas Nethercote
8de763bdb1 servo: Merge #6572 - Wire up the JS engine's memory reporting (from nnethercote:js-reporting); r=jdm
SpiderMonkey provides an extremely fine-grained breakdown of memory
usage, but for Servo we aggregate the measurements into a small number
of coarse buckets, which seems appropriate for the current level of
detail provided by Servo's memory profiler. Sample output:
```
|      17.41 MiB -- url(file:///home/njn/moz/servo/../servo-static-suite/wikipedia/Guardians%20of%20the%20Galaxy%20(film)%20-%20Wikipedia,%20the%20free%20encyclopedia.html)
|          7.32 MiB -- js
|             3.07 MiB -- malloc-heap
|             3.00 MiB -- gc-heap
|                2.48 MiB -- used
|                0.34 MiB -- decommitted
|                0.09 MiB -- unused
|                0.09 MiB -- admin
|             1.25 MiB -- non-heap
```
Most of the changes are plumbing to get the script task communicating
with the memory profiler task.

Source-Repo: https://github.com/servo/servo
Source-Revision: 2b0bdbe1c195f2f6dd7671981999d622c505fbc5
2015-07-15 17:37: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
Ms2ger
40b58b5744 servo: Merge #6600 - Implement Window#top (from Ms2ger:top); r=Manishearth
Source-Repo: https://github.com/servo/servo
Source-Revision: bd3380e0b611034c3159129ad5834ae9e9db6d22
2015-07-11 04:01:33 -06:00
Tim Taubert
0cceca72b1 servo: Merge #6505 - Implement crypto.getRandomValues() (from ttaubert:issue/4666-crypto-getRandomValues); r=Ms2ger
Didn't touch mozjs or rust-mozjs because implementing that in the code generator didn't seem too easy. I'm using the same workaround that the TextDecoder does.

Using the OsRng should be the right choice here? As the OS keeps state for us we wouldn't need to have a global rng instance to keep around.

Fixes #4666.

Source-Repo: https://github.com/servo/servo
Source-Revision: c0222628264423a67bf98775be83dcf2f85211ab
2015-07-05 22:16:19 -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
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
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
Simon Sapin
ab51eb3db1 servo: Merge #6388 - Remove usage of String::from_str, deprecated in #6377 (from SimonSapin:from_str); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 91cae119311064cab7f20ff898c1d885054907b5
2015-06-15 09:23:22 -06:00
Corey Farwell
711c6ca962 servo: Merge #6349 - rust-geom API changes (from frewsxcv:geom-api-changes); r=pcwalton
Shouldn't be merged until these have merged:

https://github.com/servo/rust-geom/pull/81

https://github.com/ecoal95/rust-offscreen-rendering-context/pull/13

https://github.com/servo/rust-layers/pull/178

~~I'll also need to update the Cargo lock files once they merge~~

Source-Repo: https://github.com/servo/servo
Source-Revision: cfcd8589d06935f83b903f76477ea03e4d4652d0
2015-06-13 13:52:07 -06:00
James Graham
35d7b3b717 servo: Merge #6009 - Add support for switching frames with the webdriver API (from jgraham:webdriver_frames); r=jdm
This moves webdriver_traits into msg to avoid a circular dependency.

Source-Repo: https://github.com/servo/servo
Source-Revision: d08995e1a94fa093b7fc1e5d918d9dca79f260d6
2015-06-01 17:30:37 -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
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
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
Glenn Watson
a6f3ad40b3 servo: Merge #6131 - Fix several hangs / panics during pipeline cleanup of in progress loads (from glennw:jquery-exit-fix); r=jdm
This fixes a hang found while testing the jQuery test suite.

Source-Repo: https://github.com/servo/servo
Source-Revision: c51e9f04559f04f1e820b792261e1653c6869ee5
2015-05-19 21:44:45 -05:00
James Graham
533e9f1cd6 servo: Merge #6022 - Add enough execute_async_script support to webdriver that we can run web-platform-tests (from jgraham:webdriver_execute_async_script); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: b05c3fc0c063e32168a9630dc2a0e8adc9285dae
2015-05-14 05:02:27 -05:00
Ms2ger
de1db6c2cc servo: Merge #6001 - Merge the JS context and runtime structs into Runtime (from Ms2ger:runtime); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: d1a0aacc60a27a6a9d0709c505d9621a5ebc2f78
2015-05-10 15:14:37 -05:00
Patrick Walton
0b766e32a2 servo: Merge #5936 - layout: Don't rerun selector matching unless we need to when resizing the window (from pcwalton:fast-resize); r=jdm
2.1x improvement on resizing on Reddit.

r? @jdm

Source-Repo: https://github.com/servo/servo
Source-Revision: bfd16984623e55d835a0a9c08e985d96257c49c0
2015-05-07 18:13:29 -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
da599fc5b9 servo: Merge #5951 - Clean up the Au API (from SimonSapin:au-cleanup); r=mbrubeck
Fix #5943.

r? @mbrubeck

Source-Repo: https://github.com/servo/servo
Source-Revision: 1721cf45ed59306a69f3ade08feca065804c3804
2015-05-05 15:08:12 -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
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
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
Mátyás Mustoha
e3f5a0bd67 servo: Merge #5802 - Fix some irregular indentation (from mmatyas:indentfix); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 43d666f94b9b1b8313d430785946b8d3e020fecf
2015-04-22 19:49:30 -05:00
Glenn Watson
835b3be20c servo: Merge #5767 - Refactored image cache task - details below (from glennw:image-cache); r=larsbergstrom,jdm
* Simpler image cache API for clients to use.
 * Significantly fewer threads.
   * One thread for image cache task (multiplexes commands, decoder threads and async resource requests).
   * 4 threads for decoder worker tasks.
 * Removed ReflowEvent hacks in script and layout tasks.
   * Image elements pass a Trusted<T> to image cache, which is used to dirty nodes via script task. Previous use of Untrusted addresses was unsafe.
   * Image requests such as background-image on layout / paint threads trigger repaint only rather than full reflow.
 * Add reflow batching for when multiple images load quickly.
   * Reduces the number of paints loading wikipedia from ~95 to ~35.
 * Reasonably simple to add proper prefetch support in a follow up PR.
 * Async loaded images always construct Image fragments now, instead of generic.
   * Image fragments support the image not being present.
 * Simpler implementation of synchronous image loading for reftests.
 * Removed image holder.
 * image.onload support.
 * image NaturalWidth and NaturalHeight support.
 * Updated WPT expectations.

Source-Repo: https://github.com/servo/servo
Source-Revision: ac0645c2363b5a6ea3930b0857b3a27f1b6d033f
2015-04-22 19:16:46 -05:00
Josh Matthews
901eb35f52 servo: Merge #5156 - Support opt-in async network events (from jdm:asyncnet); r=pcwalton,Manishearth
This implements a framework for opting in to receiving network events asynchronously. It also converts XMLHttpRequest to use them, and paves the way for better support for synchronous XHR using on-demand, targeted event loops instead of spinning the global event loop. This gives us complete feature parity with the existing XHR implementation, using fewer threads than before in the async case.

Source-Repo: https://github.com/servo/servo
Source-Revision: 3151497d498b001b4a783dce0595615c6fc40936
2015-04-16 11:33:06 -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
Adenilson Cavalcanti
4fca85538a servo: Merge #5673 - Squashing a few compiler warnings (from Adenilson:squashWarnings); r=SimonSapin
Source-Repo: https://github.com/servo/servo
Source-Revision: 92991f807021fa99b844f03a6458f97fe86bf5c6
2015-04-13 16:47:09 -05:00
Guro Bokum
fe578d1f21 servo: Merge #5636 - Firefox timeline integration #4957 (from JIoJIaJIu:timeline); r=jdm
Available markers only:

Reflow
DOMEvent
Also need to implement:

Style marker
Paint marker
Javascript marker
frames reply, depends on getting javascript stack
I decided to make pull request before implemented another markers for getting feedback.
mb it would be better to create separated tasks.

Notices:
Marker doesn't fill stack and stackEnd
MemoryActor sends fake data because there is no memory profiler per tab
FramerateActor sends empty Vec, need implement http://mxr.mozilla.org/mozilla-central/source/dom/base/nsGlobalWindow.cpp#5240

Source-Repo: https://github.com/servo/servo
Source-Revision: 74c847a17fb560dd4cd62069778776f6f06df19f
2015-04-13 12:44:49 -05: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
aditya
89383d8b47 servo: Merge #5491 - Fix issue 5466 (from ChimeraCoder:fix-issue-5466); r=Manishearth
@kenpratt and I moved the URL and IFrame fields from Reflow to LayoutTask, as described in #5466.

This is my first attempt at Rust, so let me know how this is!

Source-Repo: https://github.com/servo/servo
Source-Revision: e4da29b28b6efce3f84f00ef7d2d1716954c500d
2015-04-02 14:18:42 -06:00
Josh Matthews
ace2c5ee02 servo: Merge #5459 - Make reflow queries always perform reflow. Fixes #5458 (from jdm:reflowquery); r=saneyuki
Source-Repo: https://github.com/servo/servo
Source-Revision: 6bedf4a229f07a9cce589466cb398cd5afdd382d
2015-04-01 14:03:43 -06:00
Patrick Walton
c9e2901806 servo: Merge #5400 - layout: Implement CSS transitions per CSS-TRANSITIONS § 2 (from pcwalton:transitions-redux); r=glennw
Transition events are not yet supported, and the only animatable
properties are `top`, `right`, `bottom`, and `left`. However, all other
features of transitions are supported. There are no automated tests at
present because I'm not sure how best to test it, but three manual tests
are included.

r? @glennw

Source-Repo: https://github.com/servo/servo
Source-Revision: ebdf1d494b6c986e6dfcb7d8fd3f0ffa126523ed
2015-03-31 10:39:56 -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
Ms2ger
a866f2e1e2 servo: Merge #5416 - Remove some int/uints (from Ms2ger:int); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 674e52afa1012cb342629dab4d3abae975a16fe9
2015-03-28 13:58:02 -06:00
Thiago Pontes
ebfcbc1f1f servo: Merge #5181 - Notify devtools about new worker globals (from thiagopnts:master); r=jdm
This is for #4704. I'm not sure if this is the best approach, so I'm open to suggestions.

Source-Repo: https://github.com/servo/servo
Source-Revision: 439e3150d74453b86abbcc7934b7e5152f102940
2015-03-27 13:33:56 -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
32417e1cd8 servo: Merge #5351 - Add links for script::dom::window to whatwg HTML spec (from frewsxcv:window-docs); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 8b5df113f0202e889195e3772e13c037c4d33cc7
2015-03-24 23:54:48 -06:00
Corey Farwell
2be8901a8a servo: Merge #5343 - Clean up a few things in script::dom::window (from frewsxcv:script-dom-window); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 1432b630d2fb54be1bae512d3a37cc0aee714db4
2015-03-24 10:33:55 -06:00
Josh Matthews
5b0eafa083 servo: Merge #5327 - Fix double-panic when the script task panics (from Ms2ger:memory-explosion); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 5ce7d8accfc52dd37b19b4400a643a980412bb2f
2015-03-23 13:39:53 -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
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
Ms2ger
01a90574bd servo: Merge #5288 - Fix various build warnings (from Ms2ger:warnings); r=SimonSapin
Source-Repo: https://github.com/servo/servo
Source-Revision: 0663cd632517c9a9c86db47456c5a4da637045ed
2015-03-20 11:00:54 -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
Glenn Watson
ac172c1efc servo: Merge #5205 - First (and biggest) part of refactoring constellation to support iframe navigation (from glennw:iframe-nav); r=jdm
The history is now recorded per frame, but needs to be exposed in a followup PR.

Source-Repo: https://github.com/servo/servo
Source-Revision: 1092ca10192c79b4b96c25985a2c6245d369090b
2015-03-16 17:54:50 -06:00
Zack Slayton
faacf82bc3 servo: Merge #5217 - localStorage shim, fixes #5195 (from zslayton:master); r=jdm
@jdm This initial version has a few outstanding issues that I wanted to invite input on. Specifically:

1. I had some difficulty finding a home for the `StorageType` enum. Structs defined outside of the `script` module don't seem to be able to use the `#[jstraceable]` annotation and the `net` module (where `StorageTask` lives) doesn't have access to `script`. Per Simon Sapin's suggestion, I worked around this temporarily by creating a `TraceableStorageType` stand-in struct that was traceable and which could be translated into a regular `StorageType` when being sent to the `StorageTask`. Unsure of the best way to resolve this hack. Thoughts?

2. Apart from the `Storage` constructor used in `Window::SessionStorage` and the new `Window::LocalStorage`, there's also a method called `Storage::Constructor`. I'm unclear on what (if anything) will actually invoke this, so I'm not sure which variant of `StorageType` to use here. I've temporarily created an `Unknown` variant of `StorageType` as a placeholder.

3. I discovered that the web platform tests directory's localStorage tests. Many of them now pass despite the configured expectation that they fail. However, several do not pass. Is there a good way for me to add debug logging or otherwise get a sense of which assertion failed / what went wrong?

Thanks for your continued help!

Source-Repo: https://github.com/servo/servo
Source-Revision: b8e87ea020879090c931421cf3cec73d8cd1156f
2015-03-16 14:48:51 -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
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
Pawel Kondzior
4be04275fb servo: Merge #4960 - Add thaw/freeze messages that can suspend/resume webcontent timers #4907 (from pkondzior:add-script-timers-suspend-resume-functionality); r=jdm
Adds free/thaw methods to script_task that let you send suspend/resume messages to web content timers. Fixes #4907

Source-Repo: https://github.com/servo/servo
Source-Revision: a3ea3eed47713a4a6faa86c575bc2ac95c5fe135
2015-02-23 21:45:46 -07:00
Josh Matthews
2d23b906b0 servo: Merge #4996 - Eagerly report errors when evaluating JS on a global scope. Fixes #4966 (from jdm:reportpending); r=Ms2ger
I believe this problem was introduced with the mozjs error reporting changes, since we don't see errors reported from `<script>` blocks any more.

Source-Repo: https://github.com/servo/servo
Source-Revision: 99617557d40504060d5162739f8ba9b962843099
2015-02-23 20:30:48 -07:00
Prabhjyot Singh Sodhi
8e4c455bec servo: Merge #4956 - Fixing Intermittent failure in pages with timers (from psdh:interfail); r=jdm
Fixes #4923

Source-Repo: https://github.com/servo/servo
Source-Revision: f1f826544919b4fa7cdf4bf263abf0c0c1497f70
2015-02-21 12:51:44 -07:00
Ms2ger
057d7cb476 servo: Merge #4947 - Use rustc-serialize rather than the built-in deprecated serialize (from Ms2ger:serialize); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: afb152a8569953f730df564be2745c5a6302bf6f
2015-02-17 07:30:50 -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
4dd00911b1 servo: Merge #4866 - Updated trigger_fragment to take a string instead of URL and updated cal (from KiChjang:trigger-fragment-string); r=jdm
Fixes #4863

Source-Repo: https://github.com/servo/servo
Source-Revision: 29d24a5049cda10111bb36f3ca2d798e68137107
2015-02-12 10:18:45 -07:00
Simon Sapin
da87abc762 servo: Merge #4893 - Upgrade to rustc ba2f13ef0 2015-02-04 (from servo:rustup_2015-01-31); r=Ms2ger,glennw
Ready for review.

Final link step on android fails, but we know how to fix it and will add it to this branch soon.

Source-Repo: https://github.com/servo/servo
Source-Revision: 2cc08f289ab909de44fa09a07b2c43b70ce379b9

--HG--
rename : servo/ports/gonk/build.rs => servo/support/rust-task_info/build.rs
2015-02-11 17:24:45 -07:00
Ms2ger
845ba25d04 servo: Merge #4889 - Use base64 from rustc-serialize (fixes #4747) (from Ms2ger:4747-base64); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 58b7186cea7a61645b38158053e3849d121fa487
2015-02-10 07:24:45 -07:00
Ms2ger
e80f986397 servo: Merge #4887 - Import net as net rather than servo_net (from Ms2ger:servo_net); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: e3a4d493117ffd09ce75270b36012845ebb9c08c
2015-02-10 05:15:45 -07:00
Ms2ger
37b5782606 servo: Merge #4886 - Import msg as msg rather than servo_msg (from Ms2ger:servo_msg); r=saneyuki
Source-Repo: https://github.com/servo/servo
Source-Revision: 29d3b872de4abb693b75e71fc0b987c52b0fd1f6
2015-02-10 03:51:46 -07:00
Glenn Watson
d93ca71608 servo: Merge #4842 - Implement window.frameElement, change window.parent to make use of it (from glennw:window-frameelement); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: d0f61f4f85acda3da2f0bbcccc5949f185f94373
2015-02-07 04:51:41 -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
Glenn Watson
0fb02d59d2 servo: Merge #4811 - Implement window.parent for iframes (from glennw:window_parent); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 0beb070d482323889556276b122624a2b14cd08b
2015-02-04 15:24:50 -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
Tom Schuster
7f57a4451b servo: Merge #4594 - Implement most of the important WindowProxy traps (from evilpie:window-proxy); r=jdm
After this patch somebody just needs to implement the new IndexedGetter (and probably frames/length) on window to fix #4589.

Source-Repo: https://github.com/servo/servo
Source-Revision: a227faa41610cdc826da4ec8d25839c2ec3061db
2015-01-12 09:45:47 -07:00
Ms2ger
7eb4d4db43 servo: Merge #4584 - Deny unsafe blocks in script (from Ms2ger:unsafe); r=jdm
As a first start, this allows them indiscriminately where used.

Source-Repo: https://github.com/servo/servo
Source-Revision: f74d5360ba30ec7aaa12f675eb267fd11053d8a8
2015-01-09 07:15:52 -07:00
Guillaume Bort
2fc1f6a506 servo: Merge #4069 - Fix #3936 – {Window,WorkerGlobalScope}.set{Timeout,Interval}(DOMString) (from guillaumebort:fix/3936); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: df6a7959df69bf98b397f088fc3cf1fad2cc0aaf
2015-01-08 08:48:54 -07:00
Ms2ger
e5578c14fd servo: Merge #4554 - Update rustc to revision 2cfb5acb5a2751c759627377e602bac4f88f2d19 (from servo:rustup_20141221); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 1d7148c79f9124779a910fd5291c5fa0543b2dae
2015-01-08 08:00:57 -07:00
Ms2ger
62056757ed servo: Merge #4535 - Stop using some obsolete features (from servo:pre-rustup_20141221); r=jdm
This prepares for the rust upgrade currently being conducted.

Source-Repo: https://github.com/servo/servo
Source-Revision: e8fac3681b690adb0796b2a807ac95bd9c13597a
2015-01-03 14:39:46 -07:00
Josh Matthews
3df7a65e2a servo: Merge #4057 - Enable refcounting arbitrary DOM types (from jdm:refcountdom); r=Ms2ger
This replaces the specialized TrustedXHRAddress and TrustedWorkerAddress code that was used for the same purpose. A non-zero refcount pins the given DOM object's reflector and prevents it from being GCed even when there are no other outstanding references visible to SpiderMonkey. This will enable us to implement asynchronous operations that refer to particular DOM objects (such as "queue a task to fire a simple event named load at the iframe element" from the spec) safely and conveniently, and paves the way for things like asynchronous network responses.

Some concerns about the resulting size of XHR progress messages have been expressed, but I believe optimizations to reduce that can be implemented in subsequent PRs.

r? @Ms2ger - note in particular the changes to the worker lifetime code. I couldn't figure out how to achieve an identical lifetime to the previous addref/release pairing, and I also was having trouble figuring out why the existing setup was safe. The new implementation now holds the main script task Worker object alive via the TrustedWorkerAddress field in the dedicated worker global scope, which is a significant difference.

Source-Repo: https://github.com/servo/servo
Source-Revision: 2c259f477c41331e66beab8bda865971982a1ff4
2014-12-29 11:57:45 -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
Tetsuharu OHZEKI
8bc1f6376b servo: Merge #4434 - script: Remove glob imports added in #4405 (from saneyuki:glob_script); r=jdm
#4406

Source-Repo: https://github.com/servo/servo
Source-Revision: 803e5ef7904f2843d8e44184f9154af079eea9fa
2014-12-18 15:57:48 -07:00
Matt McCoy
667e396b08 servo: Merge #4416 - Merge request for #4407. Removes the cloning because it wasn't necessary (from mattnenterprise:fire-timer-clone); r=jdm
I tested that it worked correctly by using running './mach run tests/html/test_timeout.html' and making sure the timers went off.

Source-Repo: https://github.com/servo/servo
Source-Revision: 7df37847d3a0a02da6917c669fe62a5e4af7efcd
2014-12-18 09:39:56 -07:00
Glenn Watson
b185394a0f servo: Merge #4405 - Update rustc to revision 3dcd2157403163789aaf21a9ab3c4d30a7c6494d (from servo:rustup_20141124); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: fbf42c951b2f53d91e2f32f8035484a07ea83493
2014-12-17 18:45:49 -07:00
Manish Goregaokar
bff63476bf servo: Merge #4381 - Fix window.performance.now() (from Manishearth:performancenow); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: e0ec21e814f07601fa3e5e2ec04de7c7a0fd7893
2014-12-15 20:00:53 -07:00
Patrick Walton
ee36da2b11 servo: Merge #3844 - script: Improve dirty propagation and fix script-layout synchronization (from pcwalton:script-layout-synchronization); r=jdm
This fixes race conditions whereby layout and script could be running
simultaneously.

r? @jdm
cc @cgaebel

Source-Repo: https://github.com/servo/servo
Source-Revision: 5f2684d2f81046abd7548fb22d996d1e506a104a
2014-12-15 15:31:21 -07:00
Ms2ger
6e64bb9ddb servo: Merge #4332 - Pass the timing information to PerformanceTiming rather than exposing methods (from Ms2ger:performance); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: a016f7b201425a4a837168407a25705aaabf30b0
2014-12-11 17:33:53 -07:00
Manish Goregaokar
895099501f servo: Merge #4002 - Implement framework for element activation (fixes #3999) (from Manishearth:activation); r=jdm
Still need to impl `Activatable` on all activatable elements. I'll probably push those changes to this PR, however they can be made separately as well.

Source-Repo: https://github.com/servo/servo
Source-Revision: 19c69b1625dda46d3c5501292e7e2d0328e400b4
2014-12-06 03:55:04 -07:00
Ms2ger
7b333b9954 servo: Merge #4245 - Introduce MutNullableJS::or_init (from Ms2ger:lazy-getters); r=Manishearth
Source-Repo: https://github.com/servo/servo
Source-Revision: 66d4acef8d591b5516d99cb4c7dd9e379242b928
2014-12-05 03:46:07 -07:00
nkdalmia
b5db4cdee6 servo: Merge #4157 - M1450: Implement Window.sessionStorage: Storage Task, Storage Methods (excluding Storage event, QuotaExceededError) (from nkdalmia:master); r=jdm
Changes
* Implemented Storage Task
* Used Storage Task in methods of storage.rs
* Updated webstorage test expectations

Pending Changes:
* Handle Storage Event
* Throw QuotaExceededError in case of failure for method setItem
* localStorage as alias of sessionStorage

Source-Repo: https://github.com/servo/servo
Source-Revision: 0d2251510fb9ad8f4974c99cadafbd1a9a81e30f
2014-12-03 16:54:57 -07:00
Michael Booth
8b0b657cb0 servo: Merge #4156 - Updated reflect_dom_object to be passed by value fixes #4122 (from Michael03:master); r=Ms2ger
This fixes issue #4122

Source-Repo: https://github.com/servo/servo
Source-Revision: ed45aa9efd6cf238a83fcae6a772886df61771f7
2014-12-02 05:24:49 -07:00
Trevor Riles
c8bc2efde0 servo: Merge #4064 - Make set_timeout_or_interval's is_interval an enumerated value instead of a boolean (from trevorriles:isintervalenum); r=jdm
Created an `IsInterval` enum to improve readability and remove the need for `true // is_interval`

I'm still fairly new to rust. I briefly looked for a way to implement boolean comparisons of the enum but didn't figure out a way.

Also I'm not attached to any of the names. Let me know what I can fix :)

Source-Repo: https://github.com/servo/servo
Source-Revision: 90007ee781e53f65344a24a0bdbeb86d5c0fe065
2014-11-23 21:36:37 -07:00
Mukilan Thiyagarajan
f925eec2be servo: Merge #3941 - Allow passing arguments to setTimeout/setInterval callbacks (from mukilan:timeout-arguments); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 43b452f3b874c4bf0392ceaec27a0e40f18b5e34
2014-11-15 11:09:32 -07:00
Ms2ger
2aa3272664 servo: Merge #3979 - Use {Cell,RefCell}::as_unsafe_cell (from Ms2ger:as_unsafe_cell); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 7d3b76c60d2d5bd61cf6b48d09d769df77af293d
2014-11-14 15:48:35 -07:00
Josh Matthews
4d3016e023 servo: Merge #3585 - Implement single-line text input (from jdm:input); r=gw
This attempts to implement a bunch of the DOM Level 3 Events spec by implementing the KeyboardEvent interface, the document focus context, and dispatching keyup/keydown/keypress events appropriately. There's also some support for multiline text input that's untested.

Source-Repo: https://github.com/servo/servo
Source-Revision: 2ffa845cf463b14b19322d477a77ffd20efa89a9
2014-11-13 10:57:33 -07:00
Glenn Watson
22c4035692 servo: Merge #3948 - Rust upgrade to rustc hash b03a2755193cd756583bcf5831cf4545d75ecb8a (from servo:rustup-20141105_2); r=Manishearth
Source-Repo: https://github.com/servo/servo
Source-Revision: c5e1b0d32e17fad29799023c85e2e73ac89c3af7
2014-11-12 20:48:31 -07:00
Patrick Walton
35e2f9710a servo: Merge #3761 - Invert control flow, fix resizing, and improve checkerboarding significantly (from pcwalton:smooth-scrolling); r=larsbergstrom
r? @glennw @mbrubeck

Source-Repo: https://github.com/servo/servo
Source-Revision: ffae1104989c0177b483d591a482e5cd877183c2
2014-11-04 18:12:32 -07:00
Martin Robinson
1628fc65f1 servo: Merge #3857 - Have ContentBox(es)Queries consult the flow tree (from mrobinson:queries); r=pcwalton
Instead of looking at the display tree, have ContentBox(es)Query consult
the flow tree. This allow optimizing away parts of the display tree
later. To do this we need to be more careful about how we send reflow
requests, only querying the flow tree when possible.

Fixes #3790.

Source-Repo: https://github.com/servo/servo
Source-Revision: c9089c45c4b7d40419233b48a192d85a8ad71c99
2014-11-03 12:03:37 -07:00
Matt Brubeck
eb3242aca9 servo: Merge #3721 - Synchronous script loading during HTML parsing (from mbrubeck:script-sync); r=Ms2ger
Fixes #3356.  This makes script elements fetch their source synchronously and execute immediately by default.  It also lays some groundwork for future deferred or async script loading.

(Depends on #3716 to fix a content test failure caused by running script during parsing.)

Source-Repo: https://github.com/servo/servo
Source-Revision: 272ae0cc1beb83c839d5fbd746e67f4ae746db99
2014-10-29 15:51:41 -06:00
Tetsuharu OHZEKI
3cfe65e281 servo: Merge #3776 - Macroize event handler getters and setters (from saneyuki:macro); r=jdm
Fix #3755

This doesn't convert some specialized event handlers (e.g. `HTMLBodyElement`'s ones, `HTMLElement.GetOnload()`).

Source-Repo: https://github.com/servo/servo
Source-Revision: 470d27a6681b4647de64c085654403820d48f7af
2014-10-22 22:30:29 -06:00
Tetsuharu OHZEKI
a1364ae852 servo: Merge #3737 - Use DOMRefCell in script crate (from saneyuki:cell); r=jdm
#3050

Altough LayoutDataRef is touched from layout, we don't use DOMRefCell in it becasuse
it's expected to manipulate in layout task.

Source-Repo: https://github.com/servo/servo
Source-Revision: f5e8df9dac9330f2818906c471ed05f5975828c6
2014-10-22 07:54:36 -06:00
Manish Goregaokar
4271b077f4 servo: Merge #3684 - Add #[dom_struct], inline autogenerated trace() methods (from Manishearth:dom_struct); r=jdm
This attribute implies #[jstraceable], #[privatize], and #[must_root].

Source-Repo: https://github.com/servo/servo
Source-Revision: 9af090006017747809f5f72a8870bd516b20f483
2014-10-15 23:24:20 -06:00
Mukilan Thiyagarajan
1a8adf4234 servo: Merge #3662 - Implement timers (setTimeout/setInterval) for workers (from mukilan:worker_timer); r=jdm
Closes issue #3236

Source-Repo: https://github.com/servo/servo
Source-Revision: f94228d9f95327aac987103806b6ed452c96f16a
2014-10-15 20:48:22 -06:00
Tim Taubert
993d0f5a2e servo: Merge #3666 - Privatize DOM (fixes #3644) (from ttaubert:issue/3644-privatize-dom); r=Manishearth
This PR removes public fields from all (hope I didn't miss any) DOM structs. Should |Page| be privatized as well? This PR additionally introduces a #[privatize] lint to ensure nobody accidentally re-introduces a public field.

All changesets compile separately if applied in the same order. Hope that helps reviewing but I can of course squash them before merging.

Source-Repo: https://github.com/servo/servo
Source-Revision: f350879574194bb612eac88e21d0920e9827afa7
2014-10-13 22:00:37 -06:00
Manish Goregaokar
f32cdad867 servo: Merge #3642 - Implement extremely basic form submission (from Manishearth:form-submit); r=jdm
This is missing a lot of parts, so it doesn't really make any real-world form submission work yet. It provides a skeleton on which the missing bits can be filled in.

What works:
 - `<input>` elements except for `type=file`
 - GET/POST methods
 - URLencoded `enctype`s (default)
 - Submission via `<form>.submit()` only

Stuff that needs to be done for most simple real-world cases to work:
 - [Working text input](https://github.com/servo/servo/pull/3585)
 - Click handlers for `<submit>`
 - Possibly `<textarea>` support
 - Support for the other two enctypes (#3649)

Todo:
 - Correctly implement [planned navigation](https://html.spec.whatwg.org/multipage/forms.html#planned-navigation) using `TrustedFormAddress`  (#3648)
 - [Correctly implement form owners.](https://github.com/servo/servo/issues/3553) Requires html5ever and some discussion of the spec.
 - `<input type=file>` support
 - Image submit support
 - Browsing contexts/targets
 - Support for non-`<input>` controls
 - Validation (?)
 - Dirname (?)

Source-Repo: https://github.com/servo/servo
Source-Revision: 9dfd5e7fcd2011a411b219e8c45aadc0ecb270bd
2014-10-11 07:45:39 -06:00