Commit graph

5232 commits

Author SHA1 Message Date
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
bors-servo
15e0b48728 auto merge of #2154 : Ms2ger/servo/enumerated-codegen, r=jdm 2014-04-18 09:16:16 -04:00
bors-servo
2e6a0078b3 auto merge of #2157 : lpy/servo/issue2153, r=Ms2ger
see #2153
2014-04-18 08:04:19 -04:00
lpy
94d3c4739a Remove resource_task argument from css_link_listener.(fixes #2153) 2014-04-18 19:58:10 +08:00
Ms2ger
5ac5ba2468 Support nullable strings in dictionaries.
We copy the string in all cases, so there's no need to handle the isMember
case differently.
2014-04-18 11:37:56 +02:00
Ms2ger
b31fdf12ef Add a few tests for dictionary codegen. 2014-04-18 11:30:16 +02:00
Ms2ger
4d20d1716d Implement support for default values for enumeration arguments. 2014-04-18 11:08:21 +02:00
Ms2ger
d53841b016 Handle exceptions from FindEnumStringIndex correctly.
The previous code would return success from the JSNative with a pending
exception, potentially leading to assertion failures inside the JS engine
later.
2014-04-18 10:18:24 +02:00
Ms2ger
baa3845362 Rewrite FindEnumStringIndex to distinguish 'value not found' and 'exception raised'.
This is in preparation for handling those cases differently.
2014-04-18 10:18:17 +02:00
Ms2ger
fa653a5984 Introduce some (commented-out) tests for enumeration codegen. 2014-04-18 10:18:11 +02:00
bors-servo
4379809e88 auto merge of #2152 : jsanders/servo/fix-inline-css-resource-task-failure, r=jdm
Fixes #2121

I thought this would be better than passing an `Option<ResourceTask>` to `parse_css` because it avoids having to handle the potential failure at runtime when unwrapping.

No test included, but the error was reproducible by running content/test_getBoundingClientRect.html, and this fixes it. Glad to find a way to add an explicit test if need be.
2014-04-17 22:04:07 -04:00
James Sanders
8bfb5f8b6f Associate ResourceTask with UrlProvenance 2014-04-17 19:52:42 -06:00
bors-servo
0b1c8bf8d6 auto merge of #2147 : jdm/servo/untraceable, r=Ms2ger
...actices, and replace ad-hoc Untraceable structs with empty Encodable implementations.
2014-04-17 18:04:10 -04:00
Josh Matthews
742f73ded5 Add transparent Traceable and Untraceable types to aid proper rooting practices, and replace ad-hoc Untraceable structs with empty Encodable implementations. 2014-04-17 17:41:09 -04:00
bors-servo
b3bc449137 auto merge of #2148 : larsbergstrom/servo/android_201404c, r=metajack
On Android, our feeble GPU graphics stack is even less reliable than it is on Linux. To make it easier to bring Android devices online, this patch defaults to CPU rendering, which is much more stable and, frankly, faster.

r? @metajack
2014-04-17 17:37:11 -04:00
Lars Bergstrom
6c1fc7c19d Default to CPU renering on Android to avoid GPU-rendering-specific driver woes 2014-04-17 16:30:32 -05:00
bors-servo
7441dae1af auto merge of #2129 : lpy/servo/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.
2014-04-17 13:34:09 -04:00
lpy
b7dcf62ed0 Implement Window.set/clearInterval.(fixes #2116) 2014-04-18 01:30:39 +08:00
bors-servo
8aee787b9f auto merge of #2146 : metajack/servo/bye-bye-nss, r=jdm
These were not being used and are responsible for a large amount of work
and problems.
2014-04-17 11:34:11 -04:00
Jack Moffitt
984bbed586 Remove NSS and NSPR from the build.
These were not being used and are responsible for a large amount of work
and problems.
2014-04-17 09:20:53 -06:00
bors-servo
524518a801 auto merge of #2145 : SimonSapin/servo/to_ascii_lower, r=metajack
This reverts [some changes made during the 2014-03-04 Rust upgrade](bbac8aa5c3 (diff-d084c1d37003c83f26aa4dac0e8d9e6bL221)). @larsberg, what was the reason for preferring the unsafe `.to_ascii_nocheck()`?

r? @larsberg
2014-04-17 11:10:12 -04:00
bors-servo
3478105da9 auto merge of #2143 : Ms2ger/servo/optional-primitives, r=jdm
By forgetting the Some(), we caused type inference to convert to Option<T>
for optional non-nullable primitive arguments, and to Option<Option<T>> for
optional nullable primitive arguments (essentially the same thing). This
change brings the primitive codegen in line with the DOMString codegen.

Using distinct types for optionality and nullability would have prevented
this issue.
2014-04-17 10:40:15 -04:00
Simon Sapin
47f24dee78 Use to_ascii_lower() and eq_ignore_ascii_case() instead of unsafe code. 2014-04-17 15:26:16 +01:00
Ms2ger
c9c96d4758 Ensure that optional primitive arguments aren't treated as nullable.
By forgetting the Some(), we caused type inference to convert to Option<T>
for optional non-nullable primitive arguments, and to Option<Option<T>> for
optional nullable primitive arguments (essentially the same thing). This
change brings the primitive codegen in line with the DOMString codegen.

Using distinct types for optionality and nullability would have prevented
this issue.
2014-04-17 16:23:09 +02:00
bors-servo
28baa1f4d1 auto merge of #2138 : cgjones/servo/fedora-build-instructions, r=jdm
Pretty straightforward, except that Fedora doesn't provide a package with the MS core fonts, so devs have to build the package themselves.
2014-04-16 21:31:08 -04:00
Chris Jones
079e85c5d4 Add instructions for building servo on Fedora Core. 2014-04-16 18:21:36 -07:00
bors-servo
aafadb65f2 auto merge of #2135 : mbrubeck/servo/refcell-get, r=larsbergstrom
It's going away in the next Rust upgrade (mozilla/rust#13301). r? @larsbergstrom

We'll need to do the same in rust-layers.
2014-04-16 19:58:07 -04:00
Matt Brubeck
5cc1825537 Stop using deprecated RefCell<T>::get
It's going away in the next Rust upgrade.
2014-04-16 16:51:27 -07:00
bors-servo
a52248f765 auto merge of #2134 : mbrubeck/servo/frametree-clone, r=larsbergstrom
This fixes an issue where a ChildFrameTree is inserted into a clone of its parent, rather than its "real" parent, as noted in #2124.

This moves `FrameTree::iter` and the methods that depend on it into a new trait that is implemented on `Rc<FrameTree>`, since it's safe to clone an `Rc<FrameTree>`.

r? @larsbergstrom
2014-04-16 19:19:08 -04:00
Matt Brubeck
f7b21b82af Stop cloning FrameTrees
This fixes an issue where a ChildFrameTree is inserted into a clone of its
parent, rather than its "real" parent, as noted in #2124.
2014-04-16 16:13:45 -07:00
bors-servo
d413814379 auto merge of #2102 : jdm/servo/warnings, r=metajack 2014-04-16 17:49:04 -04:00
Josh Matthews
d04efe6037 Fix some private type in public signature warnings. 2014-04-16 17:20:15 -04:00
bors-servo
0616297c46 auto merge of #2097 : SimonSapin/servo/pseudo-cleanup, r=pcwalton 2014-04-16 17:19:12 -04:00
bors-servo
beb8513796 auto merge of #2132 : mbrubeck/servo/constellation-cleanup, r=larsbergstrom
Just some mostly-mechanical refactoring to remove unnecessary mutability and unnecessary exports in constellation.rs.
2014-04-16 15:49:16 -04:00
Matt Brubeck
315c7810bd De-RefCell FrameTree::pipeline 2014-04-16 12:16:08 -07:00
Matt Brubeck
bb22fddfff Privatize some Constellation internals 2014-04-16 12:11:29 -07:00