Commit graph

167 commits

Author SHA1 Message Date
Corey Farwell
a5ddc4d3c6 servo: Merge #6592 - Use NotImplementedError for Python base class methods (from frewsxcv:notimplementederror); r=Ms2ger
From the Python docs:

https://docs.python.org/2/library/exceptions.html#exceptions.NotImplementedError

"In user defined base classes, abstract methods should raise this
exception when they require derived classes to override the method."

Source-Repo: https://github.com/servo/servo
Source-Revision: a9f12da4f8a48daa197ff8bbc2021009fe6e2711
2015-07-21 11:28:21 -06:00
Ms2ger
2fa4baeb5d servo: Merge #6621 - Move away from the repeat().take().collect() pattern (from Ms2ger:repeat); r=SimonSapin
This was the preferred pattern between the deprecation of Vec::from_elem and
the addition of the count argument to the vec![] macro.

Source-Repo: https://github.com/servo/servo
Source-Revision: 556c0e1509cb48b90f492bcf0f25d0ed14b015d1
2015-07-14 02:42:26 -06:00
Corey Farwell
78f93158a2 servo: Merge #6580 - Remove tidy blacklist for 'script/dom/bindings/*' (from frewsxcv:lint-codegen); r=Ms2ger
Recently, I found myself reading through the Python codegen scripts that
live in 'components/script/dom/bindings/*' and noticed that there were
many tidy violations: unnecessary semicolons, weird spacing, unused
variables, lack of license headers, etc. Considering these files are now
living in our tree and mostly maintained directly by contributors of
Servo (as opposed to being from upstream), I feel these files should not
be excluded from our normal tidy process. This commit removes the
blacklist on these files and fixes all tidy violations.

I added these subdirectories to the blacklist because they appear to be
maintained upstream somewhere else:

* "components/script/dom/bindings/codegen/parser/*",
* "components/script/dom/bindings/codegen/ply/*",

Also, I added a few '# noqa' comments which tells us to ignore the
flake8 errors for that line; they are mostly for unused/undefined
variables. I chose to ignore these (instead of fixing them) to make the
work for this commit simpler for me.

Source-Repo: https://github.com/servo/servo
Source-Revision: 2d2a340633dcc73e458a8454b78e26ba93511d37
2015-07-09 07:55:27 -06:00
Ms2ger
d7892fb4aa servo: Merge #6549 - Remove *Cast::from_actual (from Ms2ger:from_actual); r=nox
Since JSRef was removed, from_actual duplicates from_ref.

Source-Repo: https://github.com/servo/servo
Source-Revision: 0298c92670bee90c06f98fac2e8469d1238d1bd4
2015-07-03 22:56:17 -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
Mukilan Thiyagarajan
54306745e4 servo: Merge #6496 - CGImports must consider special operations to generate required 'use' items (from mukilan:fix_import_codegen); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: b7923547a77a2d887805ba67f688d297e34647c1
2015-06-27 07:51:37 -06:00
Ms2ger
4ac16d06ff servo: Merge #6469 - Use Rc::get_mut rather than deprecated rc::get_mut (from Ms2ger:rc-mut); r=saneyuki
Source-Repo: https://github.com/servo/servo
Source-Revision: ef97879c273e9eed3b4dece07813c2d4e6eb2c38
2015-06-26 09:26:55 -06:00
Ms2ger
99cf771646 servo: Merge #6464 - Use Box::into_raw rather than boxed::into_raw (from Ms2ger:into_raw); r=saneyuki
The latter is deprecated.

Source-Repo: https://github.com/servo/servo
Source-Revision: 9eb3cc2a241dff4df57d644fa5257fcf3a52325f
2015-06-26 04:50:54 -06:00
Joel Teichroeb
c23dfd93eb servo: Merge #6110 - Implement Named constructors and the Image constructor for HTMLImageElement (from klusark:NamedConstructor); r=Ms2ger
I'm not sure if I like how I mostly just duplicated the code in CodegenRust.py, so that might need to be refactored.

Instead of just calling it Image, we might want to call it ConstructorImage, to make it clear that it's a constructor. Anyone have an opinion on that?

There seems to be a bug in the HTMLImageElement getter/setter as the value is 0 regardless of what I do. This seems to be unrelated to my commits, so I'll investigate that separately.

Source-Repo: https://github.com/servo/servo
Source-Revision: 57cc84b2935c429c92774649275625a7fd63973c
2015-06-25 02:18:06 -06:00
Anthony Ramine
e6ba88516e servo: Merge #6223 - Merge generic funs to share them across all bindings (fixes #2684) (from nox:merge-generic-functions); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 6247a96761279979412fb49fa4fbca2fd9a82e1b
2015-06-24 03:54:56 -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
Jack Moffitt
85fd686b68 servo: Merge #6408 - Generate code into OUT_DIR (from metajack:script-outdir); r=SimonSapin
This is necessary to ensure Cargo knows when to rebuild. Normally
.gitignore would be enough to exclude these from Cargo's freshness
calculation, but https://github.com/rust-lang/cargo/issues/1729 prevents
this currently. This is the new, correct way to do these thigns, just
like the style crate does.

Source-Repo: https://github.com/servo/servo
Source-Revision: ff59e1b8de67f1988522d6b6e6c4adda957fad5b
2015-06-17 16:36:05 -06:00
Ms2ger
758ff53bd9 servo: Merge #6378 - TreeWalker-acceptNode-filter.html fixes (from Ms2ger:callable); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: 24af4c4ec638b0484c8acacdf7cb9acb87da24ff
2015-06-14 12:17:21 -06:00
Mukilan Thiyagarajan
d0d7a0e325 servo: Merge #6319 - Fix codegen for overload resolution. Fixes #6300 (from mukilan:overload-codegen); r=Ms2ger
The cause of the issue is that the index of the overload to be invoked was being derived from the wrong lists (that contain only a subset of the overloads)  - `possibleOverloads` and `interfaceSigs` rather than the `method.signatures()` (which contains all possible overloads).

Source-Repo: https://github.com/servo/servo
Source-Revision: b46ab0c60d53461d639c74d9c6b39d0c6c2d78c9
2015-06-10 03:50:42 -06:00
Daniel Le
40dcea91f9 servo: Merge #6299 - Avoid casting in the callers (from GreenRecycleBin:#6271); r=Ms2ger
get_proto_or_iface_array now returns *mut ProtoOrIfaceArray

Fix #6271

Source-Repo: https://github.com/servo/servo
Source-Revision: ca6a34a1cdf3b74f9eab04cf6ff914e47b37b640
2015-06-07 10:47:14 -05:00
Brian Anderson
72f556065f servo: Merge #6297 - Convert inline(always) to inline in CodegenRust and jstraceable (from brson:inline); r=jdm
This results in a 14% compile time improvement.

See https://gist.github.com/brson/b48dd03b06c406be68e6

I'm not suggesting you merge this as-is, but you might consider whether removing some of these is worth pursuing.

Source-Repo: https://github.com/servo/servo
Source-Revision: 78665336e6a3d57e43610365f52ce038ba0d9e8b
2015-06-06 08:25:29 -05:00
Josh Matthews
c4cc28789a servo: Merge #6247 - Trace the prototype array on the global object (from jdm:tracefix); r=Ms2ger
This should allow the jQuery testsuite to complete.

Source-Repo: https://github.com/servo/servo
Source-Revision: 9edc296c46b05606c74920a42ba0effb5c953db0
2015-06-03 05:26:26 -05:00
ecoal95
73d5e20fe6 servo: Merge #6183 - Add WebGLContextAttributes support (from emilio:webglcontextattributes); r=nox
r? @jdm

I couldn't add the `getContextAttributes` method since `CodegenRust`
doesn't know how to return a dictionary value, I'll take a look at it ASAP.

I think the helper functions can return directly the renderer, since they're used just for that, but I wanted to hear your opinions about this.

By the way I'm interested in adding more serious tests for WebGL, and I think the [khronos conformance suit](https://github.com/KhronosGroup/WebGL/tree/master/conformance-suites/1.0.3) should be the best option.

Should I try to integrate it in wpt, or making a `tests/webgl` directory (or similar) inside the servo tree? (Maybe this question should be for @Ms2ger)

Source-Repo: https://github.com/servo/servo
Source-Revision: 0de09b936e5e37c15b7865157a98ad78b1077659
2015-06-01 08:37:48 -05:00
Philipp Hartwig
5fd9e25365 servo: Merge #6179 - Use byte string instead of handcrafted byte array (from aopicier:byte_strings); r=jdm
Fixes #3257
In eventtarget.rs I'm not sure whether ARG_NAMES actually needs to be static!?

Source-Repo: https://github.com/servo/servo
Source-Revision: 999325460ecc71b02160e8c79e71a694987d9acd
2015-05-25 17:13:27 -05:00
Anthony Ramine
cf915bf9ce servo: Merge #5902 - Fix length value of interface methods (from nox:length); r=jdm
Blocked by https://github.com/w3c/testharness.js/pull/124.

Source-Repo: https://github.com/servo/servo
Source-Revision: 8faa9f877df67ad6bced9b5ec4ae580c042bfa45
2015-05-14 13:37:10 -05:00
Anthony Ramine
b5ec349295 servo: Merge #5894 - Implement WebIDL attribute PutForwards (from nox:putforwards); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 29a43a00b39e544596e3bcce9bdfca2159313ba5
2015-05-07 09:07:12 -05:00
Anthony Ramine
55930d5b87 servo: Merge #5896 - Properly generate proxy stringifiers (from nox:stringifier-proxy); r=jdm
The proxy stringifiers called through {}.toString.call() (obj_toString) shouldn't use the stringifier.

Source-Repo: https://github.com/servo/servo
Source-Revision: 2c177794408bfbb5f8d6042f38639a5cba5eb2e5
2015-04-30 04:33:32 -05:00
Ms2ger
33e1b9c8ab servo: Merge #5888 - Prepare for the rustup (from Ms2ger:prepare-rustup); r=SimonSapin
Source-Repo: https://github.com/servo/servo
Source-Revision: ab2d07db1fabd7ad9590aa7296038bbc91806c3f
2015-04-28 17:52:49 -05:00
snf
758d239681 servo: Merge #5845 - Fix defineProperty codegen (from snf:defineProperty_fix); r=jdm
This patch should get rid of #5223.

Source-Repo: https://github.com/servo/servo
Source-Revision: 01925f0f8f65be177e0c2d9bab14b091bf67b220
2015-04-28 07:51:31 -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
Manish Goregaokar
e158f4fca9 servo: Merge #5855 - Add move protection to Root and friends (from Manishearth:nomove); r=kmc,munksgaard
fixes #5724, #5737


uses https://github.com/Manishearth/rust-tenacious (can be moved in-tree if needed)

I can make it `Deny` by default too (I'll add a cargo feature to tenacious), though we might want it on
`Warn` until we get some mileage on it.

Source-Repo: https://github.com/servo/servo
Source-Revision: d7987e43c944eb9b156bf3244c08fce4cb570db4
2015-04-27 23:14:25 -05:00
Anthony Ramine
ba829d0432 servo: Merge #5850 - Fix generation of nullary callbacks (from nox:nullary-callbacks); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 92359c7b9addfe7ee161760aad20368bafd76c26
2015-04-27 08:42:42 -05:00
Anthony Ramine
d4b6a6316e servo: Merge #5852 - Remove unsafe transmute functions in JS and LayoutJS (from nox:rm-unsafe-transmute); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 56a7981c9c9c6df30fbb3add3d8d0085916fe313
2015-04-26 14:40:31 -05:00
Anthony Ramine
6c157bacf0 servo: Merge #5779 - Implement the CSS interface (from nox:css-escape); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 1f9de5ee2ce4dc039b01e575d60a4fee41a0b8b8
2015-04-25 05:42:41 -05:00
Ms2ger
7b37ef8efe servo: Merge #5801 - Stop using the deprecated range function (from Ms2ger:range); r=pcwalton
Source-Repo: https://github.com/servo/servo
Source-Revision: 43e664cda1dd562935fe5e4fdd92e5abcf6fb8f9
2015-04-22 18:24:21 -05:00
Chris Paris
c3c824224f servo: Merge #3726 - Support callback interfaces with constants (from ChrisParis:callback-constants); r=jdm
This addresses https://github.com/servo/servo/issues/3149. The immediate purpose is to support the constants in NodeFilter. The changes mostly follow the current Gecko Codegen.py. The main gist is that the generation of certain code artifacts is now gated by hasInterfaceObject() or hasInterfacePrototypeObject(), rather than by isCallback().

Source-Repo: https://github.com/servo/servo
Source-Revision: 1f9c2f9b34dede8182f45655b03380f8c26f3475
2015-04-13 14:34:39 -05:00
Josh Matthews
60287419bd servo: Merge #5633 - Clean up CGImports a bit more (from jdm:codegencleanup); r=Ms2ger
r? @Ms2ger

Source-Repo: https://github.com/servo/servo
Source-Revision: b019df892790cba347ba848d0e72e3c24a311c18
2015-04-12 03:37:05 -05:00
Josh Matthews
9127cd8cb9 servo: Merge #5619 - Remove glob import from generated bindings. Fixes #1788 (from jdm:bindglob); r=Manishearth
r? @Ms2ger

Source-Repo: https://github.com/servo/servo
Source-Revision: 596091e32c1577e2d77fa0ab0750280d9fe51f5d
2015-04-10 04:41:46 -05:00
Anthony Ramine
eeb520dd32 servo: Merge #5611 - Cleanup CharacterData (from nox:cleanup-characterdata); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 51dd6984f7cc292d77b2330d404ffcff34981214
2015-04-09 10:10:20 -05:00
Ms2ger
916ace51f1 servo: Merge #5564 - Cleanup some JS conversions (from Ms2ger:FromJSValConvertible); r=saneyuki
Source-Repo: https://github.com/servo/servo
Source-Revision: 71e07013ded2dd168bfc3be4db79bebe230786ef
2015-04-08 06:09:56 -05:00
Ms2ger
3dea48290b servo: Merge #5569 - Implement support for object in IDL (from Ms2ger:object); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 3fb666cf606f835a9ab9165339e34023ab83a358
2015-04-07 13:32:02 -05:00
Anthony Ramine
685ac5ef7e servo: Merge #5541 - Use Temporary values in node iterators (from nox:node-iterators-temporary); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: e57630711fed229cb9c939aa31619f42aa62651e
2015-04-07 10:22:10 -05:00
Ms2ger
82f444e9cd servo: Merge #5511 - Stop using int/uint in script (from Ms2ger:int); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 036b3eaa04fc4d94b8fd29a9c8e0f6020f55d23d
2015-04-03 13:54:46 -06:00
Tetsuharu OHZEKI
5bf2fed53e servo: Merge #5346 - Add bindings support for unrestricted float values (from saneyuki:binding); r=jdm
- Fix #707
- Take over from #5106

Source-Repo: https://github.com/servo/servo
Source-Revision: e77c4e2d76104855c42d1eee09caf36b61acccad
2015-03-25 01:09:47 -06:00
Tim Cuthbertson
b25ea3bb55 servo: Merge #5282 - Free the interface prototype array when Window is finalized (from timbertson:finalize_global); r=Ms2ger
Fixes #1871

I thought I'd take a look at this for a first contribution to servo. A couple of things I'm not 100% sure on are:

1) `get_proto_or_iface_array` returns a `*mut *mut JSObj`, which I'm assuming is really an array of pointers to `JSObj`s. So dropping its return value will drop the memory for the array of pointers. Do we also need to drop each element, or is that handled by GC?

2) Are there any tests I need to add for this? I don't know if there are existing leak tests, or if leaks are mostly discovered by profiling.

Source-Repo: https://github.com/servo/servo
Source-Revision: 8998edb912b4f6efea7b2ff4e707325d7c03488c
2015-03-20 07:54:48 -06:00
Ms2ger
16387caff8 servo: Merge #5208 - Implement USVString (from Ms2ger:USVString); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 19cd87aefc24fa153fa013b5f96ae46de9a427fd
2015-03-13 14:30:49 -06:00
Ms2ger
afc3b1285b servo: Merge #5206 - Pre rustup codegen cleanup (from Ms2ger:pre-rustup-codegen-cleanup); r=jdm,SimonSapin
Source-Repo: https://github.com/servo/servo
Source-Revision: c05de08630c50446cb15e42f4948fae6039e7271
2015-03-13 08:42:49 -06:00
Chris Double
76b2c425eb servo: Merge #5202 - Fix #2108 by renaming unwrap functions to native_from_reflector (from doublec:rename_unwrap); r=Ms2ger
Fix for issue #2108. That issue mentions an `unwrap_object` which doesn't seem to exist so I renamed `unwrap` to `native_from_reflector` and `unwrap_jsmanaged` to `native_from_reflector_jsmanaged`. The latter is a bit unweildy - maybe a shorter name might be better?

Source-Repo: https://github.com/servo/servo
Source-Revision: d7e9b8b96b77377fa37fd59cdb8c44fa866b5b2e
2015-03-12 01:51:49 -06: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
Ms2ger
f10e3ac24e servo: Merge #5110 - Fix string default values (from Ms2ger:defaultvalue-strings); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 2f3697f5f346cac7578883f452735d50b832c986
2015-03-02 12:57:59 -07:00
Ms2ger
1e32ac8466 servo: Merge #5103 - Use the correct lifetime bounds for FooCast::from_actual (from Ms2ger:from_actual); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 184d32b519f1c5daf7dda164c9179e6c8ddc0919
2015-02-28 13:33:49 -07:00
Ms2ger
093e8fa985 servo: Merge #5099 - Cleanup our exception story (from Ms2ger:exceptions); r=saneyuki
Source-Repo: https://github.com/servo/servo
Source-Revision: 5eaf1144c327272e18584db9cf047d8bb2b53eed
2015-02-28 11:09:55 -07:00
Chris Manchester
4e33e62e67 servo: Merge #5094 - Add support for BinaryName attribute to servo's codegen (fixes #4435) (from chmanchester:binarynames); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 1f53d30f858a71206fce01116a3b1e5c199c1648
2015-02-28 09:57:58 -07:00
Ms2ger
1bc0663206 servo: Merge #5100 - Fix a typo in argument_type (from Ms2ger:descriptorProvdider); r=Manishearth
Source-Repo: https://github.com/servo/servo
Source-Revision: b84f620b26b5dd14cb4a92bf428c5c722a6f6eb4
2015-02-28 08:45:54 -07:00
Ms2ger
a9f76e032c servo: Merge #5017 - Mark some unused arguments as unused in bindings (from Ms2ger:unused-args); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 3ea09bf2ea8db621107abbc8b358f1c0ce0ffea4
2015-02-22 10:15:47 -07:00
Ms2ger
2379d5a154 servo: Merge #5015 - Only unwrap the object once when finalizing (from Ms2ger:finalize); r=jdm
Previously, we had 'value' and 'this' locals, both storing a pointer to the
DOM object, for no good reason.

Source-Repo: https://github.com/servo/servo
Source-Revision: 92620c0a5f3bf01ddfb2f52fb89cdc467ff4a761
2015-02-22 08:36:49 -07:00
Chris Manchester
d6b0936869 servo: Merge #4882 - Stringifiers (from chmanchester:stringifiers); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 172db80703fc19ff078f2f46fb299cadd99a483b
2015-02-20 13:01:02 -07:00
Ms2ger
8fa61151a1 servo: Merge #4979 - Audit ints and uints in script (from Ms2ger:audit-ints); r=Manishearth
Source-Repo: https://github.com/servo/servo
Source-Revision: 276f74b1ddec9dfa4cb053eb0802f95bd5ed6b66
2015-02-20 07:09:54 -07:00
Ms2ger
88fd138436 servo: Merge #4978 - Use the try macro to initialize dictionaries (from Ms2ger:try-dicts); r=Manishearth
Source-Repo: https://github.com/servo/servo
Source-Revision: 45a0e0e65c0d104c3e29f6521b11b4285cde58d2
2015-02-20 05:54:53 -07:00
Ms2ger
39813e1fef servo: Merge #4961 - Remove the Option<Self> arguments from IDLInterface (from Ms2ger:IDLInterface); r=Manishearth
Source-Repo: https://github.com/servo/servo
Source-Revision: 1e2d6c5a2d6ffe54d610858d786cda421180cb63
2015-02-19 03:15:52 -07:00
Prabhjyot Singh Sodhi
1468fc2d06 servo: Merge #4918 - Porting Gecko's JSToNativeConversionInfo changes to Servo's codegen (from psdh:conversion); r=Ms2ger
Fixes #4800

Source-Repo: https://github.com/servo/servo
Source-Revision: 2e4f343aeae23a0fd3d9c5307778dec9b2e8ea21
2015-02-18 12:15:56 -07:00
Ms2ger
4e8c547103 servo: Merge #4936 - Replace the FooCast traits by structs (from Ms2ger:InheritTypes); r=Manishearth
Source-Repo: https://github.com/servo/servo
Source-Revision: ec42c01fba1188ef965ce9cbce59b22767c3c2fd
2015-02-15 17:18:48 -07:00
Ms2ger
d9ad6619e6 servo: Merge #4935 - Improve the formatting for FromJSValConvertible implementations in UnionTypes (from Ms2ger:UnionTypes); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 05db1a449908152495523b11b280acca338bb320
2015-02-15 15:36:48 -07:00
Ms2ger
c897ff19a3 servo: Merge #4910 - Replace squirrel_away_unique by boxed::into_raw (from Ms2ger:squirrel); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 69259e9975a0383d309b7ce678734c49e6616d32
2015-02-12 14:48:50 -07:00
Ms2ger
200c888b80 servo: Merge #4836 - Implement an Unrooted smart pointer to replace JS when it is not traced (from Ms2ger:unrooted); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 7d32ece0bf3cdfbeb98e106ec6daca5a5f4385bc
2015-02-06 04:36:44 -07:00
Ms2ger
2d4d3b187f servo: Merge #4817 - Remove the to_js methods (from Ms2ger:to_js); r=jdm
They are unused.

Source-Repo: https://github.com/servo/servo
Source-Revision: bc448f158b73206c916cb0205ca9c5a59a70c37b
2015-02-03 08:18:52 -07:00
Tetsuharu OHZEKI
39edf77177 servo: Merge #4613 - Stop using JS<T> in layout (from saneyuki:layoutjs); r=jdm
#4571

Source-Repo: https://github.com/servo/servo
Source-Revision: 462940fc2a2ba76794f37d9a6ac5af8da454aa66
2015-01-31 16:24:48 -07:00
Manish Goregaokar
42e079751b servo: Merge #4792 - Fix code dependent on old impl check (from Manishearth:old_impl); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 83e196c4c6a761757d821abfd1ab539704d22454
2015-01-31 04:27:49 -07:00
Ms2ger
648a6278e6 servo: Merge #4781 - Use some more snake case in the DOM (from Ms2ger:snake-dom); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: be31f850839219ffc9653278a0d6f55d48e059d9
2015-01-30 11:45:52 -07:00
Ms2ger
4488e6c0b8 servo: Merge #4773 - Use snake case for the remaining bindings functions (from Ms2ger:snake-bindings); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 648b4991b967cfe297a333624fa05b4de2e56be3
2015-01-30 07:00:50 -07:00
Ms2ger
03faddf314 servo: Merge #4772 - Use snake case for bindings utils functions (from Ms2ger:snake-utils); r=jdm
This is the Rust style, and there's no reason to deviate here.

Source-Repo: https://github.com/servo/servo
Source-Revision: d026457fdde615bd3185abeda0e844bd42a7805a
2015-01-29 11:45:56 -07:00
Ms2ger
23beb77c9c servo: Merge #4771 - Use snake case for proxyhandler functions (from Ms2ger:snake-proxy); r=jdm
This is the Rust style, and there's no reason to deviate here.

Source-Repo: https://github.com/servo/servo
Source-Revision: 8f351cdc3209c0be2e02b9d08fef502eb7aa04ec
2015-01-29 09:39: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
Ms2ger
190438fa42 servo: Merge #4682 - Move to to_owned rather than into_string (from servo:to_owned); r=jdm
into_string has been removed from Rust.

Source-Repo: https://github.com/servo/servo
Source-Revision: 94ebc7c32d5ce58ada3f9d8ffdb60cc025eb5997
2015-01-20 07:54:46 -07:00
Ms2ger
ec6187c22f servo: Merge #4664 - Stop using Vec::from_elem (from Ms2ger:from_elem); r=larsbergstrom
It is obsolete on Rust master.

Source-Repo: https://github.com/servo/servo
Source-Revision: d747a33df9c167a3defbbdcfe356ee25eeb672ad
2015-01-19 09:12:46 -07:00
Ms2ger
b654dc04c2 servo: Merge #4611 - Remove RethrowContentExceptions and related infrastructure (from Ms2ger:RethrowContentExceptions); r=jdm
We do not intend to implement the DOM in JS, so this code isn't necessary.

Source-Repo: https://github.com/servo/servo
Source-Revision: 665f0e9c77292a42aa5a939bd31886e3f371419e
2015-01-10 15:48:45 -07:00
Matt McCoy
8fca9b5656 servo: Merge #4566 - Fixes #4164 Make Constructor and new functions take GlobalRef by value (from mattnenterprise:globalref-by-value); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 7800d98728bfa1375ad8b6a2dac7f2f35603b6d1
2015-01-08 13:12:55 -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
11a0efe9f4 servo: Merge #4542 - Prepare for the rust upgrade (from servo:pre-rustup_20141221); r=saneyuki
In particular, this contains changes to qualify enums where rust will require it, and to stop using some features that will be removed.

Source-Repo: https://github.com/servo/servo
Source-Revision: ba8cf6b0e6145265f9472d4855f078d8b5943fe7
2015-01-04 12:39:47 -07:00
Ms2ger
3d0a04c20a servo: Merge #4526 - Move away from Root::deref (from servo:deref-1); r=Manishearth
This is a start towards fixing #3868. Not all callers have been fixed yet, so the `Deref` implementation remains for now.

Source-Repo: https://github.com/servo/servo
Source-Revision: 141b5d038fad3c0c44a6f1b309b8ca9edea54580
2015-01-02 09:22:51 -07:00
Ms2ger
3f568d3a37 servo: Merge #4528 - Stop using ptr.is_not_null() in script (from Ms2ger:is_not_null); r=larsbergstrom
This method is deprecated in rust master; removing its users in advance will
make a future rust upgrade smoother.

Source-Repo: https://github.com/servo/servo
Source-Revision: a61417e2a87004e30e2a02f2e6ae58629062e3d5
2015-01-01 14:42:44 -07:00
yodalee
3e4698f22e servo: Merge #4496 - Issue4484 to js val convertible for str (from yodalee:issue4484-ToJSValConvertible-for-str); r=jdm
#4484
Add ToJSValConvertible trait to str type.

Source-Repo: https://github.com/servo/servo
Source-Revision: fda38cf673ed1fb0818e4e33c3e7b7bef1eff02a
2015-01-01 03:00:44 -07:00
Bruno de Oliveira Abinader
1ea2e35f84 servo: Merge #4515 - Codegen cleanup (from brunoabinader:codegen-cleanup); r=Ms2ger
Main changes:
- Whitespace (indent) fixes;
- CGIndent-related fixes;
- Removed consecutive empty lines;
- Removed empty lines before closing brackets;
- Codegen style fixes;

Tests:

We don't have a static code style analyzer yet, so I've checked using the following (together with manual lookup at some selected generated bindings):

1. Check for lines with wrong indentation (1 to 3 whitespaces at the beginning)
Command: ```$ pcregrep -r "^[ ]{1,3}[^ ]" components/script/dom/bindings/codegen/Bindings```
Expected: None
Actual: None

2. Check for lines with wrong indentation (5 to 7 whitespaces at the beginning)
Command: ```$ pcregrep -r "^[ ]{5,7}[^ ]" components/script/dom/bindings/codegen/Bindings```
Expected: None
Actual: None

3. Check for lonely semicolons
Command: ```$ pcregrep -r " \{0,\};" components/script/dom/bindings/codegen/Bindings```
Expected: None
Actual: None

4. Check for empty lines before closing brackets
Command: ```$ pcregrep -r -M "^$\n {0,}\}" components/script/dom/bindings/codegen/Bindings```
Expected: None
Actual: None

5. Check for consecutive empty lines
Command: ```$ pcregrep -r -M "^$\n^$\n" components/script/dom/bindings/codegen/Bindings```
Expected: None
Actual:
```components/script/dom/bindings/codegen/Bindings/ChildNodeBinding.rs
components/script/dom/bindings/codegen/Bindings/ElementCSSInlineStyleBinding.rs
components/script/dom/bindings/codegen/Bindings/ParentNodeBinding.rs
components/script/dom/bindings/codegen/Bindings/URLUtilsBinding.rs
components/script/dom/bindings/codegen/Bindings/URLUtilsReadOnlyBinding.rs
```
All of the above are ```[NoInterfaceObject]```, thus providing only imports. We shouldn’t, however, generate empty lines (investigate this later on).

Source-Repo: https://github.com/servo/servo
Source-Revision: 37a97f3273c442fa59a3f65e8300a2527b004036
2014-12-30 09:51:45 -07:00
Bruno de Oliveira Abinader
4e7b11e9a7 servo: Merge #4483 - Add support for named deleter (from brunoabinader:named-deleter); r=Ms2ger
Closes #4469.

Source-Repo: https://github.com/servo/servo
Source-Revision: f76a460c53dfddef74262eceaf4b163b551adc08
2014-12-29 10:21:51 -07:00
Manish Goregaokar
905ce805f5 servo: Merge #4485 - Replace most to_string calls by into_string calls (from servo:into_string); r=Ms2ger
`str::to_string()` goes through a `Formatter`, `str::into_string()` is a direct copy and is apparently 5× faster.

This is a rebase of the boring and bitrot-prone parts of #4366.

Source-Repo: https://github.com/servo/servo
Source-Revision: 9857ea26cb9ee262654bee97322dbbf373486bff
2014-12-27 06:51:44 -07:00
Ms2ger
1d0d6c95fb servo: Merge #4467 - Implement HTMLElement.dataset (from servo:dataset); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 0e6304dcf7fd6712f4455151b55a361de857359d
2014-12-25 02:27:43 -07:00
Matt McCoy
9c55b5ed2a servo: Merge #4479 - This fixes #4166. throw_dom_exception will take the GlobalRef by value (from mattnenterprise:globalref-by-value); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 57b6dc939734553287a02e3a42241715266995d5
2014-12-24 16:15:45 -07:00
Ms2ger
2af2dc9669 servo: Merge #4464 - Revert PR #4038 for causing WPT failures (from servo:revert-dataset); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 0109cc3ffc6e58a5e294ff469b37a636c98cff70
2014-12-23 01:57:46 -07:00
Amanda Watson
202b5561df servo: Merge #4454 - GlobalRef passed by value in reflect_dom_object, reflect_node #4165 (from amwatson:global_update); r=jdm
Changed fn_wrap argument in reflect_dom_object() and reflect_node() to pass GlobalRef by value rather than by reference.  Fixes #4165

Source-Repo: https://github.com/servo/servo
Source-Revision: a773bd5c4568f2f33855f9cfe04b4301038429f7
2014-12-20 17:51:44 -07:00
Ms2ger
da6f46492e servo: Merge #4452 - Cleanup _obj_toString (from Ms2ger:_obj_toString); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 6efa7eedbc43c4a1752dccb6a42a080cbe232581
2014-12-20 17:24:44 -07:00
Bruno de Oliveira Abinader
def07162d0 servo: Merge #4038 - Implement HTMLElement.dataset (from brunoabinader:dataset); r=Ms2ger
Spec: https://html.spec.whatwg.org/multipage/dom.html#dom-dataset

Closes #2974.

Source-Repo: https://github.com/servo/servo
Source-Revision: 1f74e54bb2d0b16866aeaa7e4d00f801560afe7b
2014-12-20 08:06:44 -07:00
Ms2ger
1f730e0a12 servo: Merge #4449 - Cleanup unwrap_jsmanaged (from Ms2ger:unwrap_jsmanaged); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 8a4eea003276cdb4d0c4b905068c93bd3bf398ee
2014-12-20 07:36:45 -07:00
Simon Sapin
b308cce0c9 servo: Merge #4420 - Fix warnings (from servo:fix-warnings); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: eea49ee1d986c306a8eec32b64be9b10cb2278fc
2014-12-18 04:42:50 -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
Edit Balint
f458bd96e5 servo: Merge #4387 - Fixed codegen error regarding Uint8ClampedArray (from ebalint:codegen); r=Ms2ger
If we added a "readonly attribute Uint8ClampedArray arrayAttribute" in a webidl, codegen created the binding method like this: "fn ArrayAttribute(self) -> * mut JSObject;" but called it with a "*mut JSContext" parameter.

Source-Repo: https://github.com/servo/servo
Source-Revision: 38a4e71502f3b668ff322d9047af7ec8892312d3
2014-12-16 04:06:56 -07:00
Tetsuharu OHZEKI
f34203dda8 servo: Merge #4130 - Make callers of ${Derived}::${base}() use casts instead (from saneyuki:cast); r=Manishearth
Fix #4124

This also introduce `BarCast::from_actual()` which is used for up-cast for dom's actual data types (non JS pointer values).

Source-Repo: https://github.com/servo/servo
Source-Revision: 82050d1e535681ea993e4290d02bcf4b9f4ee5a2
2014-11-28 09:24:44 -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
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
Ms2ger
6fd7b67bf9 servo: Merge #3942 - Remove VoidVal (from Ms2ger:VoidVal); r=jdm
There are no undefined constants in IDL.

Source-Repo: https://github.com/servo/servo
Source-Revision: 182a9a70de44cbefcaeeb0e8d19e3831a83b40b3
2014-11-09 09:09:31 -07:00
Bruno de Oliveira Abinader
4e10132f16 servo: Merge #3884 - Implement DOMStringMap (from brunoabinader:dataset); r=jdm
This is a sub-task for #2974.

Source-Repo: https://github.com/servo/servo
Source-Revision: 46154fb7ace37e438bddb80bf1e12f4d1f0e00a1
2014-11-06 12:36:30 -07:00
Bruno de Oliveira Abinader
c4692588de servo: Merge #3881 - Various fixes to CodegenRust.py (from brunoabinader:dataset); r=jdm
Rust doesn't handle integers as bool on if statements, and defineProperty signature uses *mut instead of *const.

Source-Repo: https://github.com/servo/servo
Source-Revision: c4cfb4aae0491ca8016d3cbae9a39a6488b24739
2014-11-03 19:15:32 -07:00
Mukilan Thiyagarajan
00508772bc servo: Merge #3812 - Implement [LenientThis] support and enable it in Document.webidl (from mukilan:lenient-this); r=Ms2ger
Closes issue #3760

Source-Repo: https://github.com/servo/servo
Source-Revision: 7ba02bb11d2d9275949cb7522c5fcbc4ebcd23d1
2014-10-25 11:42:38 -06:00