Commit graph

56 commits

Author SHA1 Message Date
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
Ms2ger
efce42f3ad servo: Merge #3699 - Move jsstring_to_str and jsid_to_str to conversions.rs (from Ms2ger:jsstring_to_str); r=jdm
This appears to be a more sensible location for them.

Relevant to #433.

Source-Repo: https://github.com/servo/servo
Source-Revision: 5be4f40bef05c749bdb5353541abae21a826f6b6
2014-10-16 08:45:19 -06:00
Kasey Carrothers
06445e1567 servo: Merge #3655 - Add a to_js method to the casting trait code in CodegenRust.py (from kaseyc:add_to_js_method); r=jdm
Replace the manual checks and calls to transmute_copy in /layout/wrapper.rs with calls to to_js/

Fixes #3616

Source-Repo: https://github.com/servo/servo
Source-Revision: f1c050531f3e3669275f1fc50d92724609eba59b
2014-10-14 22:00:28 -06:00
Patrick Walton
7495bb838a servo: Merge #3623 - script: Use atom comparison in more places, especially for attributes (from pcwalton:use-atoms-2); r=jdm
75% improvement in style recalc for Guardians of the Galaxy.

Source-Repo: https://github.com/servo/servo
Source-Revision: 8077edc0622b04aeb26d42ced86ea285c9cac0e7
2014-10-14 12:42:35 -06:00
Tim Taubert
993d0f5a2e servo: Merge #3666 - Privatize DOM (fixes #3644) (from ttaubert:issue/3644-privatize-dom); r=Manishearth
This PR removes public fields from all (hope I didn't miss any) DOM structs. Should |Page| be privatized as well? This PR additionally introduces a #[privatize] lint to ensure nobody accidentally re-introduces a public field.

All changesets compile separately if applied in the same order. Hope that helps reviewing but I can of course squash them before merging.

Source-Repo: https://github.com/servo/servo
Source-Revision: f350879574194bb612eac88e21d0920e9827afa7
2014-10-13 22:00:37 -06:00
Tim Taubert
fc4bdae442 servo: Merge #3620 - Remove unnecessary deref()s (fixes #3586) (from ttaubert:issue/3586-remove-derefs); r=Manishearth
r? @Manishearth

Source-Repo: https://github.com/servo/servo
Source-Revision: 510f8a817f8144dd5046886d4ca7c612f19a3d08
2014-10-09 07:12:37 -06:00
Ms2ger
79a5a1116a servo: Merge #3477 - Move global_object_for_js_object to global.rs (from Ms2ger:global)
Reviewed-by: jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: d95b88c83043017cde8edb37b1e29352ccd15e5f
2014-09-25 14:48:32 -06:00
Manish Goregaokar
298a76a187 servo: Merge #3468 - Replace our usage our Encodable with JSTraceable; r=jdm (from Manishearth:jstraceable)
Source-Repo: https://github.com/servo/servo
Source-Revision: 95a4731c0eec0cfb2fb70af534757bc7ca63e407
2014-09-24 20:56:41 +05:01
Ms2ger
1ff224bc4e servo: Merge #3443 - Remove the glob import for UnionTypes; r=jdm (from Ms2ger:uniontypes)
Source-Repo: https://github.com/servo/servo
Source-Revision: fd5c6e8512d379751cca1bf82ea735adacdf681e
2014-09-21 22:34:27 +02:00
Ms2ger
8f23497517 servo: Merge #3441 - Don't use a glob import for codegen::{PrototypeList, RegisterBindings}; r=Manishearth (from Ms2ger:glob-import)
Source-Repo: https://github.com/servo/servo
Source-Revision: e7748216dfb315a286491d2635f6f20ac6842ff8
2014-09-21 16:13:25 +02:00
Simon Sapin
e9f1c0bcd3 servo: Merge #3438 - Upgrade Rust (from servo:rustup)
Source-Repo: https://github.com/servo/servo
Source-Revision: 045328c8e94f5bdfcd67105c5dfa9209f4cd501c
2014-09-20 15:35:08 -07:00
Cameron Zwarich
ead29cd307 servo: Merge #3433 - More progress in the &JSRef -> JSRef conversion (from zwarich:jsref-self-helpers)
Source-Repo: https://github.com/servo/servo
Source-Revision: d6ba37c68c34a3748a789caeca225083275757e5
2014-09-20 12:55:21 -07:00