Commit graph

5067 commits

Author SHA1 Message Date
Matt Brubeck
b38f7d26d1 Make sure RefCell borrows are temporary.
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.
2014-04-21 16:06:01 -07:00
bors-servo
c6bdc7b7f2 auto merge of #2202 : jdm/servo/scriptleak, r=Ms2ger
....
2014-04-21 17:13:22 -04:00
bors-servo
3c175c7ac0 auto merge of #2195 : lpy/servo/issue2190, r=Ms2ger
see #2190
2014-04-21 16:49:28 -04:00
bors-servo
73a0658b8a auto merge of #2196 : hazz/servo/initevent, r=Ms2ger
Should fix #2189

This is my first PR for servo (and first time using Rust), so apologies if anything is horribly wrong.
2014-04-21 16:22:25 -04:00
Josh Matthews
3078f58055 Ensure JS-owned memory is not leaked if a script task fails. Fixes #2201. 2014-04-21 16:10:28 -04:00
bors-servo
f864d21212 auto merge of #2072 : brunoabinader/servo/domimpl-createdocument, r=Ms2ger
Spec:
http://dom.spec.whatwg.org/#dom-domimplementation-createdocument

Closes #1509.
2014-04-21 15:58:27 -04:00
bors-servo
c760577aee auto merge of #2199 : sankha93/servo/prefix-impl, r=Ms2ger
See #1737.

r? @ms2ger
2014-04-21 15:31:36 -04:00
Sankha Narayan Guria
36bf23de20 Implement Element.prefix (Fixes #1737) 2014-04-22 00:27:06 +05:30
bors-servo
77b5c1f4f6 auto merge of #2198 : Ms2ger/servo/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.
2014-04-21 09:40:27 -04:00
Bruno de Oliveira Abinader
67c2dc42f4 Added content tests for DOMImplementation.createDocument 2014-04-21 09:30:36 -03:00
Bruno de Oliveira Abinader
41898f0a76 Implement DOMImplementation::createDocument
Spec:
http://dom.spec.whatwg.org/#dom-domimplementation-createdocument

Closes #1509.
2014-04-21 09:30:36 -03:00
Ms2ger
4f9e119334 Remove JSPageInfo::js_compartment.
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.
2014-04-21 13:43:18 +02:00
Harry Maclean
7dbf69c223 set the right flags and attrs for InitEvent 2014-04-20 19:23:55 +01:00
lpy
fd9541357f Implement CharacterData.{deleteData, insertData, replaceData} 2014-04-21 00:53:16 +08:00
bors-servo
bb8a037cb2 auto merge of #2187 : Manishearth/servo/manifest, r=Ms2ger
Since we are keeping the results of previous tests locally (in metadata/), we should probably also track the generated MANIFEST file.
It won't get updated locally when the ini files are updated, which can lead to an outdated manifest.
2014-04-19 14:13:08 -04:00
Manish Goregaokar
523c6d76a6 Track MANIFEST.json 2014-04-19 23:30:28 +05:30
bors-servo
9198e74176 auto merge of #2184 : Ms2ger/servo/remove-nyi-characterdata, r=jdm
This speeds up a web-platform-tests run by about 45 seconds (of 11-12 minutes)
by avoiding three timeouts.
2014-04-19 12:19:07 -04:00
bors-servo
666f629d5a auto merge of #2181 : Ms2ger/servo/update-expectation, r=jdm 2014-04-19 11:52:13 -04:00
Ms2ger
a04d4e63eb Remove not-yet-implemented methods from CharacterData.
This speeds up a web-platform-tests run by about 45 seconds (of 11-12 minutes)
by avoiding three timeouts.
2014-04-19 17:39:13 +02:00
bors-servo
99ad3f0a3a auto merge of #2180 : Ms2ger/servo/wpt-result, r=jdm
This ensures that unexpected results cause 'make check-wpt' to fail.
2014-04-19 11:28:12 -04:00
bors-servo
ba9177b7cc auto merge of #2178 : Ms2ger/servo/enum-position, r=jdm
This is a shorter and probably slightly more efficient to write the loop.
2014-04-19 11:01:15 -04:00
Ms2ger
6f57df0b4d Update the expectations for Document-createEvent.html. 2014-04-19 16:56:07 +02:00
Ms2ger
834af8b713 Update test expectations for #2172. 2014-04-19 15:04:17 +02:00
bors-servo
5c20ed3023 auto merge of #2179 : Manishearth/servo/refactor-canceled, r=Ms2ger
See #2177
2014-04-19 07:25:15 -04:00
Ms2ger
396ec4e63b Propagate the result of wptrunner.run_tests out of run.py.
This ensures that unexpected results cause 'make check-wpt' to fail.
2014-04-19 12:51:51 +02:00
Manish Goregaokar
a748e48f48 Rename Event::default_prevented -> Event::canceled to better match spec (#2177) 2014-04-19 16:02:14 +05:30
bors-servo
4331fad53d auto merge of #2175 : Manishearth/servo/domtests-createevent, r=Ms2ger
#2172

All subtests of `dom/events/Event-defaultPrevented.html` pass now.

CustomEvent has yet to be implemented.(#2173)
2014-04-19 06:22:07 -04:00
Ms2ger
48b8c066f9 Use position in FindEnumStringIndex.
This is a shorter and probably slightly more efficient to write the loop.
2014-04-19 12:20:50 +02:00
Manish Goregaokar
fa7bc7a686 Fix most defaultPrevented test failures (#2172) 2014-04-19 15:46:18 +05:30
bors-servo
7d9fa35671 auto merge of #2166 : campadrenalin/servo/https-dont-panic, r=jdm
This is a stab at #2401 - I think this was what @jdm had in mind for a fix.

I've also included a test. There's no "i tried" star, I'm too much of a newb for that, but hopefully the test at least confirms that servo doesn't crash on HTTPS requests.
2014-04-18 21:55:13 -04:00
bors-servo
23e325ffb7 auto merge of #2171 : evilpie/servo/patch-1, r=pcwalton
Fixes #2168
2014-04-18 21:04:17 -04:00
Tom Schuster
df6563de1a Mention automake and cmake
Fixes #2168
2014-04-18 22:49:23 +02:00
bors-servo
cd08960b0f auto merge of #2169 : Ms2ger/servo/wpt-expected, r=jgraham 2014-04-18 16:49:08 -04:00
Ms2ger
79219f2ba9 Add expected failures. 2014-04-18 21:40:41 +02:00
bors-servo
28d481664c auto merge of #2167 : Ms2ger/servo/get_dictionary_property, r=jdm
...the dictionary conversion codegen.

This also explicitly disallows dictionary members without a default value, as
the code for those doesn't currently compile.

This is the second step of my planned rewrite of the dictionary initialization
that will remove the default values we currently use to initialize the
dictionary struct in the 'new' function.
2014-04-18 14:34:10 -04:00
Philip Horger
c63ae6f11d Don't panic on https #2104 2014-04-18 11:32:46 -07:00
Ms2ger
65ed97bab8 Introduce a get_dictionary_property function to reduce duplicated code in the dictionary conversion codegen.
This also explicitly disallows dictionary members without a default value, as
the code for those doesn't currently compile.

This is the second step of my planned rewrite of the dictionary initialization
that will remove the default values we currently use to initialize the
dictionary struct in the 'new' function.
2014-04-18 20:10:55 +02:00
bors-servo
e332f2f0fe auto merge of #2164 : Ms2ger/servo/dictionary-init, r=jdm 2014-04-18 12:58:04 -04:00
bors-servo
33162a6dd9 auto merge of #2163 : Manishearth/servo/wptfix, r=Ms2ger
#2162 was a tad off, it moves the virtualenv to the object directory (x86_64-unknown-linux-gnu, etc) instead of the build directory (build/, or whatever you're using). This moves it back. (Otherwise the `clean-wpt` target won't work)
2014-04-18 11:49:05 -04:00
Manish Goregaokar
8278364f35 Put _virtualenv in the build dir, not the objdir 2014-04-18 21:11:54 +05:30
bors-servo
c7976b1e87 auto merge of #2162 : Ms2ger/servo/wpt-objdir, r=jdm 2014-04-18 11:16:16 -04:00
Ms2ger
88c5e733b5 Merge the 'new' and 'Init' functions for dictionaries.
This moves the code in callers more in line with conversions for other types
and ensures the default values given to the dictionary fields (as defined by
the defaultValue function in CGDictionary.impl) do not escape the 'new'
method. The new code is also more in line with the code used by the
FromJSValConvertible trait.

This is the first step of my planned rewrite of the dictionary initialization
that will remove the default values entirely and reduce the code
duplication in the 'Init' (now 'new') function.
2014-04-18 17:12:20 +02:00
Ms2ger
8e596d142e Use 'exceptionCode' when converting to DOMString.
This change allows us to use the code even in cases where we return a
Result type rather than a JSBool. Interface, primitive and union types
already get this right.
2014-04-18 17:12:20 +02:00
Ms2ger
a959269ea8 Support running make check-wpt with the objdir in less common places. 2014-04-18 17:10:02 +02:00
bors-servo
58efe0bf75 auto merge of #2156 : Ms2ger/servo/codegen-deadcode, r=jdm 2014-04-18 10:28:11 -04:00
bors-servo
9edfb439a6 auto merge of #2089 : Manishearth/servo/wpt, r=Ms2ger
See #1479

This sets up a basic environment for running wpt. It instantiates a virtualenv, generates the manifest if it doesn't exist*, and runs the tests.

Currently @Ms2ger's [`run-in-servo` fork of wpt](https://github.com/Ms2ger/web-platform-tests/tree/run-in-servo/)  is used.

Note: I did everything in a shell script instead of make since one cannot run `source` from a makefile (the environment is immutable, apparently)


*It does not, however, update the manifest. We'll have to add an extra script for that.
2014-04-18 10:04:07 -04:00
Ms2ger
857eb87bb6 Remove unused references to jsids in the generated code for dictionaries. 2014-04-18 15:52:40 +02:00
Ms2ger
9d7478ab8a Remove some dead code from codegen as found by pyflakes. 2014-04-18 15:52:40 +02:00
Manish Goregaokar
8cdaa9a0c4 Add web-platform-tests submodule and test runner 2014-04-18 19:21:37 +05:30
bors-servo
099815683d auto merge of #2155 : Ms2ger/servo/dictionary-codegen, r=jdm 2014-04-18 09:40:11 -04:00