Commit graph

5067 commits

Author SHA1 Message Date
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
bors-servo
f6cd507e97 auto merge of #2130 : mbrubeck/servo/frametree-copy-fix, r=larsbergstrom
We are calling `get` when we should call `borrow` or `borrow_mut`.  This is causing bugs with iframes because we append the child frame to a copy of the parent's `children` vector rather than the original.

r? @larsbergstrom
2014-04-16 12:55:16 -04:00
Matt Brubeck
abc9540713 Remove unintentional copies due to RefCell<T>::get
We are calling `get` when we should call `borrow` or `borrow_mut`.  This is
causing bugs with iframes because we append to a copy of the `children` vector
rather than the original.
2014-04-16 09:26:03 -07:00
bors-servo
aacf261bb4 auto merge of #2126 : Ms2ger/servo/avoid-unwrap_object, r=jdm
There is no good reason to have both unwrap_object and unwrap_jsmanaged.
Removing unwrap_object simplifies the codegen and makes further
simplifications easier.
2014-04-16 08:13:13 -04:00
Ms2ger
f77b775e62 Remove unwrap_object.
There is no good reason to have both unwrap_object and unwrap_jsmanaged.
Removing unwrap_object simplifies the codegen and makes further
simplifications easier.
2014-04-16 11:54:46 +02:00
bors-servo
7149a25e91 auto merge of #2112 : Ms2ger/servo/IDLInterface-JS, r=jdm 2014-04-16 04:22:11 -04:00
bors-servo
896cadbf62 auto merge of #2119 : pcwalton/servo/rm-unused-code, r=pcwalton
trivial
2014-04-15 19:28:11 -04:00
Patrick Walton
b34b42c94f box_: Remove unused code that resurfaced with the Rust upgrade 2014-04-15 14:50:14 -07:00
Ms2ger
ac46cc6047 Implement FromJSValConvertible for JS<T>. 2014-04-15 21:33:18 +02:00
bors-servo
038730c4bb auto merge of #2054 : sankha93/servo/imageattr, r=jdm 2014-04-15 12:49:14 -04:00
bors-servo
e4f33eb9b9 auto merge of #2114 : Ms2ger/servo/unused-obj-local-arg, r=jdm
This removes the local variable and prefixes the argument with an underscore.
Neither is used right now.
2014-04-15 12:22:44 -04:00
bors-servo
613e8dfaf2 auto merge of #2113 : Ms2ger/servo/DefineDOMInterface, r=jdm
This moves the assertion from its only caller into the function itself, to
clarify that we don't intent to deal with any failure here.
2014-04-15 11:52:28 -04:00
Ms2ger
e4305fe20e Remove unused variable 'obj' from binding functions.
This removes the local variable and prefixes the argument with an underscore.
Neither is used right now.
2014-04-15 17:37:54 +02:00
Ms2ger
dc11464933 Remove the return value from DefineDOMInterface.
This moves the assertion from its only caller into the function itself, to
clarify that we don't intent to deal with any failure here.
2014-04-15 17:32:10 +02:00
bors-servo
6720b8110a auto merge of #2106 : mbrubeck/servo/1959-vtable-followup, r=jdm
Follow-up from #1984. r? @jdm
2014-04-14 17:01:11 -04:00
Matt Brubeck
28a013cfc5 Move child_inserted into VirtualMethods.
Follow-up from #1984.
2014-04-14 13:39:11 -07:00