Commit graph

141 commits

Author SHA1 Message Date
Matt Brubeck
066e8db6b1 servo: Merge #2499 - Remove unnecessary pubs from script_task (from mbrubeck:unpub); r=metajack
Source-Repo: https://github.com/servo/servo
Source-Revision: 23a63ef4ae5bea0418aebd5aa55f98100291582d
2014-05-28 18:31:07 -04:00
Ms2ger
4f41f0d3e5 servo: Merge #2487 - Use *mut T for the T* pointers in SpiderMonkey (from Ms2ger:sm-mut); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: f057719bf88eb72daba799d59edce718221610ba
2014-05-26 14:25:35 -04:00
Tetsuharu OHZEKI
3ea694b552 servo: Merge #2441 - Cherry-pick the HandleEvent changes from the original vtable PR (from saneyuki:event); r=jdm
- Fix #2118
- Take over from #2293

Source-Repo: https://github.com/servo/servo
Source-Revision: e59557e3bbea1f8ba809f42cec15a72b27ad1655
2014-05-23 17:01:50 -04:00
Ms2ger
9cfa16cd52 servo: Merge #2433 - Rust upgrade (from mozilla:rustup_20140511)
Source-Repo: https://github.com/servo/servo
Source-Revision: c753f3ee05a25b2bb756c3b0c3131eac7ad58f1a
2014-05-22 18:14:24 -06:00
Manish Goregaokar
2390c2c203 servo: Merge #2442 - Async XHR GET with basic response header support (from Manishearth:xhr-async); r=jdm
(Note that only `getAllResponseHeaders()` is supported at the moment, I'll be adding the other header methods later.)

Source-Repo: https://github.com/servo/servo
Source-Revision: 28e3c1734048217cd2194ea37c887911ad03e894
2014-05-20 12:16:35 -04:00
Ms2ger
fa162ae0e7 servo: Merge #2434 - Implement iframe.contentWindow (from Ms2ger:contentWindow); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: ca9396ff9c7ebeea48d881b421854168b9afb825
2014-05-20 11:43:46 -04:00
Tetsuharu OHZEKI
c04abf198b servo: Merge #2425 - Move Window helper methods to a WindowHelpers trait (from saneyuki:window_helper); r=jdm
Fix #2418

Source-Repo: https://github.com/servo/servo
Source-Revision: 049fa56fff3493ccba4e4fe6dab49c141b35d766
2014-05-14 00:55:17 -04:00
Ms2ger
1f70f5aa30 servo: Merge #2420 - Merge Page and PageTree (from Ms2ger:merge-Page-PageTree); r=pcwalton
Source-Repo: https://github.com/servo/servo
Source-Revision: 6871e4ccb653c3b5a351e4d64ebf09de9af2acc0
2014-05-13 23:52:21 -04:00
Ms2ger
349e98a113 servo: Merge #2417 - Use a match rather than a for loop for last_loaded_url in ScriptTask::lo (from Ms2ger:scripttask-load-option-iter); r=pcwalton
...ad.

Source-Repo: https://github.com/servo/servo
Source-Revision: 6640f2edd88622ceb392272716ed9db2133cabb6
2014-05-13 17:43:47 -04:00
Ms2ger
e839758a57 servo: Merge #2403 - Move the loading of documents in iframes into HTMLIFrameElement (from Ms2ger:iframe-loading); r=jdm
Right now, the load is kicked off inside the parser glue. This is unfortunate
for several reasons:

1) we'd like to replace the current parser (libhubbub) by our own parser,
   written in Rust, so code intertwined with the parser will have to be
   rewritten;
2) it is impossible to support dynamically (i.e. from script) created iframes
   in this way;
3) the code flow around loading subdocuments is complicated needlessly.

This commit adds the constellation channel (on which the message to actually
load the document is sent) as a field on the Page, to allow HTMLIFrameElement
to access it.

In rewriting the code, support for dynamically created iframes is added, and
a task failure is avoided when the value of the src attribute can not be
parsed.

Source-Repo: https://github.com/servo/servo
Source-Revision: 1e361e8b6f04d7848d40fd19090511c0c3f16a97
2014-05-12 15:25:14 -04:00
Ms2ger
eed32bc919 servo: Merge #2393 - Remove ScriptTask::initialize_js_info (from Ms2ger:initialize_js_info); r=jdm
There is no particular leason to initilaize js_info lazily.

Source-Repo: https://github.com/servo/servo
Source-Revision: 9a71af38b98560376d3db2c210f91c1cf0770acd
2014-05-10 12:25:09 -04:00
Tetsuharu OHZEKI
f1429c0329 servo: Merge #2384 - Add UIEvent::new_uninitialized() and MouseEvent::new_uninitialized() (from saneyuki:2383); r=Ms2ger
Fix #2383

These changes introduce `FooEvent::new_uninitialized()` constructor. This constructor use to create `FooEvent` without calling `FooEvent::InitFooEvent`.

#2383 says integrating `FooEvent::new()` and `InitFooEvent`, but we need to preserve simple `FooEvent::new_uninitialized()` for `document.createEvent()`.

@jdm r?

Source-Repo: https://github.com/servo/servo
Source-Revision: 5334d8bb255c64f6d33250972a7ccf22de2afe34
2014-05-10 03:01:13 -04:00
Guro Bokum
c8c8024c22 servo: Merge #2390 - Convert as many of Page's RefCell fields to Cell as possible (fixes #1990) (from Ms2ger:1990-Page-RefCell); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: d985b6d7c233ba55175f66545bb79efbca741676
2014-05-09 18:01:16 -04:00
Manish Goregaokar
a5ae316ba0 servo: Merge #2357 - Basic synchronous GET with XHR (from Manishearth:xhr-syncget); r=ms2ger
This gets a basic synchronous GET request working. I've also tried to implement a portion of the procedures mentioned in the spec.


Blocks #2282

Source-Repo: https://github.com/servo/servo
Source-Revision: 14776522952df9990685e20151e74f4fed8742c9
2014-05-09 11:34:07 -04:00
Ms2ger
5e2e3c3c06 servo: Merge #2381 - Move debug functions to Window IDL (from Ms2ger:mozjs-spring-cleanup); r=jdm
This is a cleaner way to expose those functions, and makes it possible to
remove a significant amount code in rust-mozjs.

The assert() function is no longer exposed, as it was unused and not very
useful.

Source-Repo: https://github.com/servo/servo
Source-Revision: 78917f4e0f15c7e0dad3c9a1fc07c005bd090487
2014-05-09 10:28:10 -04:00
Glenn Watson
4cc79f8a27 servo: Merge #2339 - Modify node traversal loop to avoid JS roots assertion. Fixes #2321 (from glennw:js-event-assert); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: e9ac0d1e2cab62cbef2b23bd7ba93374b52f4c02
2014-05-07 03:04:21 -04:00
Glenn Watson
b85da72874 servo: Merge #2340 - Fix JS roots assertion when clicking on an element (from glennw:js-click-assert); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: dc49e7d1a021f0b1513492a9f01febae66796712
2014-05-07 00:46:21 -04:00
Josh Matthews
eba6928518 servo: Merge #2344 - Force a GC when shutting down each layout task. Fixes #2342 (from jdm:iframefail); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 03e0f911ec5ba005881cd4b1cc121b66648e51d6
2014-05-06 12:58:18 -04:00
Ms2ger
37492638e4 servo: Merge #2331 - Use a single JSContext per JSRuntime (from Ms2ger:global-cx-3); r=jdm
The long-term plan for SpiderMonkey is to eliminate JSContexts by merging
(most of) it into JSRuntime, so to future-proof our code, we should avoid
creating multiple JSContexts for the same JSRuntime.

However, this implies we'll have to use the same JSContext for objects in
different compartments, so we need to enter compartments. This is done by
using the with_compartment function.

Source-Repo: https://github.com/servo/servo
Source-Revision: d66197ae406e252c51bda48611ddfce78ecedb02
2014-05-06 09:58:33 -04:00
Ms2ger
6b4df23ee7 servo: Merge #2312 - Remove most ~"string"s (from Ms2ger:owned-strings); r=SimonSapin
Source-Repo: https://github.com/servo/servo
Source-Revision: b1d0dac50d30506f85c7711437eb4957ee59cc0b
2014-05-04 06:22:21 -04:00
Josh Matthews
0c3a130356 servo: Merge #2101 - Implement a safe, mostly-sound rooting rooting strategy (from jdm:newroot_rebase); r=Ms2ger
As described in #1764, this strategy uses the following properties:
* DOM members are `JS<T>` types. These cannot be used with being explicitly rooted, but they are required for compiler-derived trace hooks.
* Methods that take DOM type arguments receive `&[mut] JSRef<T>`. These are rooted value references that are cloneable but cannot escape.
* Methods that return DOM values use `Unrooted<T>`. These are values that may or may not be rooted elsewhere, but callers must root them in order to interact with them in any way. One unsoundness hole exists - `Unrooted` values must be rooted ASAP, or there exists the danger that JSAPI calls could be made that could cause the underlying JS value to be GCed.
* All methods are implemented on `JSRef<T>`, enforcing the requirement that all DOM values are rooted for the duration of a method call (with a few exceptions for layout-related code, which cannot root values and therefore interacts with `JS<T>` and `&T` values - this is safe under the assumption that layout code interacts with DOM nodes that are in the tree, therefore rooted, and does not run concurrently with content code)

Source-Repo: https://github.com/servo/servo
Source-Revision: 731e66ff132e41cdc49bc5324c0e15be19c46ec2
2014-05-03 14:25:22 -04:00
Ms2ger
9a38a7b37e servo: Merge #2297 - Stop passing owned strings to fail!() (from Ms2ger:fail-owned-str); r=jdm
The ~"string" expression is being removed in upstream rust.

Source-Repo: https://github.com/servo/servo
Source-Revision: 09374f07e2cd152b2126c49c623f00997c36cfb2
2014-05-03 11:25:22 -04:00
Ms2ger
4c28ea9b9e servo: Merge #2236 - Replace ~[T] by Vec<T> (from Ms2ger:Vec); r=jdm
I'd rather do this before it turns out that a rust upgrade removed `~[T]` behind our back.

Source-Repo: https://github.com/servo/servo
Source-Revision: 77d9f7294799459b126e61b2dc0b0b27b74a6ba7
2014-04-28 17:10:41 -04:00
Lars Bergstrom
0c4d69cdc5 servo: Merge #2238 - Rust upgrade to April 10th, 2014 (from servo:rustup_20140410c); r=Ms2ger
r? @metajack

Note that all pending submodule PRs must be landed before this should be given r+.

Source-Repo: https://github.com/servo/servo
Source-Revision: 493aa2cdf30fb2ff5886c714030a20d714764b67
2014-04-27 18:52:39 -04:00
Tetsuharu OHZEKI
254e72bd4c servo: Merge #2210 - Add APIs to abstract Page::query_layout() (from saneyuki:query); r=jdm
- see #356
- To decrease the conversion code, `JS<Node>` -> `Node`, I added API methods to `NodeHelpers`.
- I added APIs to `Page` not `Document` because I had thought that their APIs returns the hitted nodes address in the "page".

Source-Repo: https://github.com/servo/servo
Source-Revision: 6d89e67194acef35c40d03e5889dfa3c6af1502a
2014-04-24 09:52:11 -04:00
Josh Matthews
eb2497dec7 servo: Merge #2200 - Make the I Tried star appear when a top-level page load fails for networ (from jdm:loadfail); r=mbrubeck
...k-related reasons.

Under the hood, this requires treating the I Tried pipeline as a new load instead of a replacement, since the failure-handling code interacts poorly with the rest of the replacement code when we get a series of staggered failures over time from the various pipeline components.

Source-Repo: https://github.com/servo/servo
Source-Revision: cc33a721ab3cf777becf51cddbfd8fe2c1eba568
2014-04-24 01:10:12 -04:00
Matt Brubeck
244491cd63 servo: Merge #2203 - Crash when navigating back with "RefCell is already borrowed" (from mbrubeck:back-crash); r=jdm
This fixes two `RefCell<T> is already borrowed` failures when reloading an
existing pipeline, both caused by functions trying to modify `Pipeline::url`
or `ScriptTask::url` while a reference to a previous borrow is still in scope.

Note: After applying this patch, there are some painting issues after navigating back.

Source-Repo: https://github.com/servo/servo
Source-Revision: 7326df044c8f1badf8c37a16cdf31caf446b66df
2014-04-23 14:10:21 -04:00
lpy
8e35afc846 servo: Merge #2209 - Implement Element.localName.(fixes #2188) (from lpy:issue2188); r=Ms2ger
see #2188

Source-Repo: https://github.com/servo/servo
Source-Revision: 3fc2c119103ce743bda53d1ef25c360bc6c713a7
2014-04-23 03:19:23 -04:00
Josh Matthews
adad662c76 servo: Merge #2111 - Add WindowProxy support and basic browsing context concept (from jdm:browsercontext); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: bdcd8dd0c2fb9d94d3be60ebf525112417d17e51
2014-04-22 11:01:18 -04:00
Josh Matthews
da88337c6d servo: Merge #2202 - Ensure JS-owned memory is not leaked if a script task fails. Fixes #2201 (from jdm:scriptleak); r=Ms2ger
....

Source-Repo: https://github.com/servo/servo
Source-Revision: c6bdc7b7f2d39b522be5767f09f88b1b4ca5577a
2014-04-21 17:13:22 -04:00
Ms2ger
245ddf1be5 servo: Merge #2198 - Remove JSPageInfo::js_compartment (from Ms2ger:js_compartment); r=jdm
A js::rust::Compartment is little more than a glorified pointer to the
reflector of a window, so there's no good reason to use it. Instead, this
commit passes a JS<Window> directly when it's necessary.

This also means that we now have to use JS_DefineFunctions rather than
Compartment::define_functions; I believe the former is clearer to the reader
than the extra indirection involved in the latter calling through three
reopsitories.

This commit also simplifies ScriptTask::load to reuse the 'cx' local that is
in scope already, rather than refetching it through js_info.

Source-Repo: https://github.com/servo/servo
Source-Revision: 77b5c1f4f63c59ee88ad26363420fef6e2468ce1
2014-04-21 09:40:27 -04:00
Josh Matthews
c0df29bf3a servo: Merge #2147 - Add transparent Traceable and Untraceable types to aid proper rooting pr (from jdm:untraceable); r=Ms2ger
...actices, and replace ad-hoc Untraceable structs with empty Encodable implementations.

Source-Repo: https://github.com/servo/servo
Source-Revision: 0b1c8bf8d6a628c9483e94f048d1ff95e65d5da8
2014-04-17 18:04:10 -04:00
lpy
e0d65bced0 servo: Merge #2129 - Implement Window.set/clearInterval.(fixes #2116) (from lpy:issue2116); r=jdm
see #2116
I add an `is_interval` field, so that when the `TimerData` is passed by `SetInterval`, we will not delete it from `active_timers`.
Also I think maybe we can extract the code in `ClearTimeout` and `ClearInterval` into another method to avoid duplicate.

Source-Repo: https://github.com/servo/servo
Source-Revision: 7441dae1aff4966e40ef3cf4129f307d23e2eeba
2014-04-17 13:34:09 -04:00
Josh Matthews
e6188ce3b2 servo: Merge #2076 - Make find_fragment_node a method of Page (from Ms2ger:find_fragment_node); r=Ms2ger
This was part of @jdm's vtable branch, but I think it makes sense regardless of how we deal with that branch.

Source-Repo: https://github.com/servo/servo
Source-Revision: 69fbbbdf339c370b2eeb87983b550b9055ee6f83
2014-04-09 09:28:19 -04:00
Ms2ger
e2ea16582e servo: Merge #2057 - Handle an exception from cx.evaluate_script more gracefully (from Ms2ger:evaluate_script); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 3d1a4324b771db0a7babc5800c20f4bf520412ba
2014-04-07 11:19:26 -04:00
Ms2ger
5c93d47292 servo: Merge #2055 - Remove trailing whitespace (from Ms2ger:trws); r=jdm
Done with `git ls-tree --name-only -r HEAD . | grep "\.rs" | xargs sed -i 's/\s\+$//g'`

Source-Repo: https://github.com/servo/servo
Source-Revision: bf405ac81ff965c0370743185b9685b7a1de8c17
2014-04-07 10:52:26 -04:00
Josh Matthews
a3b4dbff7f servo: Merge #2041 - Upgrade rust (from servo:rustup_20140321b); r=larsbergstrom
Source-Repo: https://github.com/servo/servo
Source-Revision: 83aabe327d3b713581a4183b7f23cea0c39a94c9
2014-04-04 18:52:50 -04:00
Simon Sapin
0297c25705 servo: Merge #1988 - Acid2 2 (from pcwalton:acid2-2); r=SimonSapin
r? @metajack @SimonSapin @larsbergstrom @june0cho @hyunjunekim

Source-Repo: https://github.com/servo/servo
Source-Revision: 3ec22157ca20227cd2d648744b6c711ed0ae8366
2014-04-03 21:01:48 -04:00
lpy
7c07adb1d9 servo: Merge #2022 - Get rid of match statements in Layout queries.(fixes #2019) (from lpy:issue2019); r=jdm
see #2019

Source-Repo: https://github.com/servo/servo
Source-Revision: e3bf08ea537366a1624a082999c3548fa07d4650
2014-04-01 15:31:50 -04:00
Martin Robinson
33cb8edba0 servo: Merge #2002 - Store Window.active_timers in a HashMap (from mrobinson:issue-1477); r=jdm
A HashMap allows easily looking up a timer and canceling it in
Window.ClearTimeout.

Fixes #1477.

Source-Repo: https://github.com/servo/servo
Source-Revision: 3eac31394cb509ce7e4fa61a3543f6ec22c8bde4
2014-03-31 19:07:50 -04:00
Ms2ger
b0c7fbe938 servo: Merge #1913 - Move attributes-related functions onto JS<Element> (from Ms2ger:attributes); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 509ff7e52f6ea4f2f736d13f124c854d80c316c9
2014-03-20 14:46:34 -04:00
Tetsuharu OHZEKI
cb6991627c servo: Merge #1864 - Split TCast::to into TCast::to_unchecked and TCast::to (from saneyuki:split_cast_to); r=jdm
fix #1836

Source-Repo: https://github.com/servo/servo
Source-Revision: 831712206865e2c0516009b16e2ac60f754dd1a8
2014-03-20 10:58:36 -04:00
Lars Bergstrom
382dd8c9ba servo: Merge #1934 - Rust upgrade (from larsbergstrom:rust_20140224_squashed); r=jdm
For review only - don't approve yet (need to squash and land submodule updates first).

critic? @metajack

Source-Repo: https://github.com/servo/servo
Source-Revision: f7aa6e3d9b8bfcc0565624f1094241b3b8658bd8
2014-03-19 12:35:17 -04:00
Ms2ger
0728d02843 servo: Merge #1868 - Use the improved JSVal interfaces (from Ms2ger:JSVal); r=jdm
Requires https://github.com/mozilla-servo/rust-mozjs/pull/54.

Source-Repo: https://github.com/servo/servo
Source-Revision: 654f3db29511d3b7b7a49a875b86a8538d111bcf
2014-03-10 10:22:51 -04:00
Ms2ger
8a6b3d8aae servo: Merge #1829 - Remove page_from_context (from Ms2ger:page_from_context); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: b9b4eebab5664d026435d70bf3f2ac40c5b56826
2014-03-05 15:13:29 -05:00
Ms2ger
098edf1c89 servo: Merge #1811 - Cleanup the *Binding::Wrap functions (from Ms2ger:Wrap_); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: da6a571f9e147d884bf0fe0017204321f5d75f5d
2014-03-05 09:31:44 -05:00
lpy
c678726e97 servo: Merge #1802 - Remove next_subpage_id argument from parse_html.(fixes #1801) (from lpy:issue1801); r=kmcallister
see #1801

Source-Repo: https://github.com/servo/servo
Source-Revision: 4a6077ca4cb6e2d54e2f558c18f45849c9d3c47d
2014-03-03 19:58:28 -05:00
Keegan McAllister
030c0fa802 servo: Merge #1800 - Fix a dynamic borrow failure with iframes (from kmcallister:subpage-id); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: a30041e9608b041dcf2a46f6b9f5e183817a55ae
2014-03-03 18:16:27 -05:00
Josh Matthews
1101a9f707 servo: Merge #1755 - De-@mut the script crate (from jdm:demut); r=jdm,metajack
Requires https://github.com/mozilla-servo/rust-mozjs/pull/49.

Source-Repo: https://github.com/servo/servo
Source-Revision: ea29e3a001fb70b5e94af7a676345b4046771315
2014-02-28 13:46:38 -05:00
Tetsuharu OHZEKI
a010046858 servo: Merge #1783 - Implement "resize" DOM Event (from saneyuki:resize); r=jdm
#1715

Source-Repo: https://github.com/servo/servo
Source-Revision: def5483579fad1e7f77ca96bd10fc5eb85e37740
2014-02-28 11:07:43 -05:00