Commit graph

92 commits

Author SHA1 Message Date
Manish Goregaokar
5511e02a78 Add Comparable trait to js.rs; fixups 2014-12-06 02:51:52 -08:00
bors-servo
6bd9bf979b auto merge of #4198 : Manishearth/servo/hyper-droid, r=Manishearth
This is the Hyper pull request, plus the set up for OpenSSL on Android to make it merge.

Sean's commits have been reviewed in #4065 (My Android changes were reviewed by Glenn)
2014-12-05 04:16:11 -07:00
Sean McArthur
4ee8c3a60b convert script crate to use hyper 2014-12-04 10:06:41 -08:00
Ms2ger
d26283c065 Implement MutNullableJS::or_init.
This will make it easier to implement lazy getters.
2014-12-04 15:49:29 +01:00
Michael Booth
2cbf5a3671 Updated reflect_dom_object to be passed by value 2014-11-30 19:47:52 +00:00
Tetsuharu OHZEKI
3681628936 Make callers of ${Derived}::${base}() use casts instead. 2014-11-28 06:00:23 +09:00
Mukilan Thiyagarajan
05bd182538 Fix binding generation for Callback Functions and Callback Interfaces 2014-11-15 18:29:48 +05:30
Ms2ger
86d609abaf Use RefCell in DOMRefCell to reduce duplicated code. 2014-11-14 21:18:43 +01:00
Ms2ger
c0016c7438 Use Cell::as_unsafe_cell in Reflector::rootable. 2014-11-14 11:56:00 +01:00
Keegan McAllister
642a3592c7 Fix interfaces test 2014-11-13 12:53:54 -05:00
Josh Matthews
bb7074698a Add KeyboardEvent stub. 2014-11-13 11:24:14 -05:00
Glenn Watson
0a0b4c657c Rebase and fix up compile errors for rust upgrade. 2014-11-13 11:25:19 +10:00
Jack Moffitt
d1b433a3b3 Rust upgrade to rustc hash b03a2755193cd756583bcf5831cf4545d75ecb8a 2014-11-13 11:17:43 +10:00
Martin Robinson
c7327450ef Clip display list based on frame viewport
Instead of creating a display list for the entire page, only create one
for an area that expands around the viewport. On my machine this makes
incremental layout of http://timecube.com 50% faster.
2014-11-11 08:46:16 -08:00
Ms2ger
aa83388f38 Remove VoidVal.
There are no undefined constants in IDL.
2014-11-08 18:00:04 +01:00
Ms2ger
3ed3c9a978 Document bindings/conversions.rs. 2014-11-07 18:33:38 +01:00
Ms2ger
223c3bc7ae Document bindings/callback.rs. 2014-11-07 12:22:00 +01:00
Ms2ger
52ef7f7948 Document bindings/trace.rs. 2014-11-07 12:11:50 +01:00
Ms2ger
bfa1ab816f Document bindings/utils.rs. 2014-11-07 11:57:37 +01:00
Bruno de Oliveira Abinader
a9d68474c9 Remove warning from 'deleter' WebIDL codegen 2014-11-06 11:31:58 -08:00
Bruno de Oliveira Abinader
b50cfa56a9 Couple more fixes to handle 'setter' properties in WebIDL 2014-11-06 11:31:58 -08:00
Bruno de Oliveira Abinader
315f626393 Various fixes to CodegenRust.py 2014-11-03 17:26:23 -08:00
Patrick Walton
a94e13f888 script: Use an FNV hash to hash event listeners.
The security properties of SipHash are irrelevant for event listeners
and the creation of the random number generator was showing up high in
the profiles.
2014-10-28 11:34:06 -07:00
Patrick Walton
5e9127e2b2 script: Use a 16-element SmallVec for the root collection.
In my tests the size of the root collection never exceeded 7, so 16
seems like a nice conservative number.
2014-10-28 11:12:09 -07:00
Mukilan Thiyagarajan
e023662571 Implement [LenientThis] support and enable it in Document.webidl
Closes issue #3760
2014-10-25 12:05:36 +05:30
Keegan McAllister
f508a82582 Provide safety check helpers in release builds
debug_assert! uses

    if cfg!(not(ndebug)) { ... }

so the body in a release build is dead code, but it still needs to compile.
2014-10-24 16:53:58 -07:00
Keegan McAllister
49234484d6 Ignore the HTML parser's borrow flag in GC tracing
Adds some other dynamic checks in debug builds.
2014-10-24 16:27:37 -07:00
Keegan McAllister
6ec0939a22 Dynamically check DOMRefCell access from layout in debug builds 2014-10-24 16:27:37 -07:00
Keegan McAllister
96e180a22c Customize RefCell instead of wrapping it
This gets rid of a dubious transmute:

    let val = mem::transmute::<&RefCell<T>, &T>(&self.base);

The code duplication will be reduced once rust-lang/rust#18131 is fixed.
2014-10-24 16:27:36 -07:00
Ray Clanan
85f746f9b9 Rename untraceable!() to no_jsmanaged_fields!(). References issue #3671 2014-10-23 21:33:32 -04:00
Gilles Leblanc
8b727e3680 Edits dom/bindings/DESIGN.md
This corrects and improves the dom/bindings/DESIGN.md document and also
corrects a grammatical error in a tests/reftest.rs message.
2014-10-17 23:12:58 -04:00
Keegan McAllister
9da7679367 Use html5ever for HTML parsing 2014-10-16 13:06:34 -07:00
Ms2ger
b60a601f56 Move jsstring_to_str and jsid_to_str to conversions.rs.
This appears to be a more sensible location for them.

Relevant to #433.
2014-10-16 10:42:09 +02:00
Ehsan Akhgari
840d949d97 Throw DataCloneError from worker postMessage if structured clone fails
This fixes #3248.
2014-10-15 21:57:40 -04:00
Tetsuharu OHZEKI
80593d9cc5 Add DOMRefCell<T> for safe borrowing in layout.
This type simply wraps `RefCell<T>` to add the special method,
and introduce the method to return the pointer of the value contained in
itself, for used in layout task.
2014-10-15 13:41:03 +09:00
Kasey Carrothers
6d91e92c90 Add a to_js method to the casting trait code in CodegenRust.py
Replace the manual checks and calls to transmute_copy in /layout/wrapper.rs with calls to to_js

Fixes #3616
2014-10-14 19:06:53 -07:00
Patrick Walton
5f8d3f72d8 layout: Introduce support for legacy presentational attributes to selector
matching, and use it for `<input size>` and `<td width>`.

This implements a general framework for legacy presentational attributes
to the DOM and style calculation, so that adding more of them later will
be straightforward.
2014-10-14 12:44:09 -07:00
Patrick Walton
ee2ccc4f87 script: Use atom comparison in more places, especially for attributes.
75% improvement in style recalc for Guardians of the Galaxy.
2014-10-14 10:32:40 -07:00
bors-servo
f350879574 auto merge of #3666 : ttaubert/servo/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.
2014-10-13 22:00:37 -06:00
Tim Taubert
da7590d108 Privatize Window 2014-10-13 13:25:44 +02:00
Tim Taubert
9a52bb8310 Privatize InheritTypes 2014-10-13 11:13:12 +02:00
Ms2ger
76ba40d5cb Remove support for {return,native,concrete}Type overrides in Bindings.conf.
We have no reason to support non-default type names, and this commit corrects
the computations for callbacks (which needed the override until now).
2014-10-10 13:13:43 +02:00
Clark Gaebel
d12c6e7383 Incremental Style Recalc
This patch puts in the initial framework for incremental reflow. Nodes' styles
are no longer recalculated unless the node has changed.

I've been hacking on the general problem of incremental reflow for the past
couple weeks, and I've yet to get a full implementation that actually passes all
the reftests + wikipedia + cnn. Therefore, I'm going to try to land the different
parts of it one by one.

This patch only does incremental style recalc, without incremental flow
construction, inline-size bubbling, reflow, or display lists. Those will be coming
in that order as I finish them.

At least with this strategy, I can land a working version of incremental reflow,
even if not yet complete.

r? @pcwalton
2014-10-09 12:55:21 -04:00
Tim Taubert
35f8270c64 Remove unnecessary deref()s (fixes #3586) 2014-10-09 15:01:54 +02:00
Manish Goregaokar
427b3b7733 Remove Traceable/Untraceable entirely 2014-10-05 22:58:00 +05:30
Manish Goregaokar
b7c3a1cd5d Remove Untraceable from utils.rs 2014-10-05 22:53:52 +05:30
Manish Goregaokar
dcbb941300 Remove Traceable from callback.rs 2014-10-05 22:53:52 +05:30
Manish Goregaokar
707a2870fa Remove Traceable/Untraceable from page.rs 2014-10-05 22:53:50 +05:30
Manish Goregaokar
22567762a0 Remove Traceable/Untraceable from window.rs 2014-10-05 22:39:24 +05:30
Manish Goregaokar
5c8a45d74e Remove Traceable/Untraceable from xmlhttprequest.rs 2014-10-05 22:32:10 +05:30