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
Manish Goregaokar
0fdee70cbf
Remove Untraceable from workerglobalscope.rs
2014-10-05 22:27:52 +05:30
Manish Goregaokar
a8997e9638
Remove Untraceable from treewalker.rs
2014-10-05 22:23:02 +05:30
Manish Goregaokar
4f362ab5e6
Remove Untraceable/Traceable from document.rs
2014-10-05 21:58:59 +05:30
Manish Goregaokar
7defa5e941
Remove Untraceable from dedicatedglobalworkerscope.rs
2014-10-05 21:36:17 +05:30
Manish Goregaokar
63dd3070d1
Remove Traceable from customevent.rs
2014-10-05 21:33:45 +05:30
Manish Goregaokar
8de00ab999
Remove Traceable from browsercontext.rs
2014-10-05 21:12:26 +05:30
Josh Matthews
54fcab61d6
Implement MutNullableJS for mutable, nullable member pointers to DOM objects.
2014-10-01 17:06:23 +02:00
Keegan McAllister
d50114c41d
Use string-cache's Namespace type
2014-09-29 21:40:54 -07:00
Keegan McAllister
6429750b33
Eliminate servo_util::atom
...
We only needed this for Encodable, and now we use JSTraceable instead.
2014-09-29 18:39:36 -07:00
Simon Sapin
b3245fa407
Upgrade to rustc d2b30f7d3 2014-09-23
2014-09-29 17:41:45 +01:00
bors-servo
42205675b3
Merge pull request #3508 from wenderen/JSTraceable.key
...
trace keys as well
Reviewed-by: Manishearth
2014-09-27 23:21:28 -06:00
Rohan Prinja
e50e704f5a
trace keys as well
2014-09-28 09:44:43 +05:30
bors-servo
c10948736f
Merge pull request #3497 from zwarich/extended-deref
...
Add an extended_deref method to JSRef
Reviewed-by: Manishearth
2014-09-27 12:48:30 -06:00
Cameron Zwarich
8334942d0c
Add an extended_deref method to JSRef
...
The extended_deref method will take a JSRef<'a, T> and produce an &'a T,
in contrast to the standard deref method that takes an &'b JSRef<'a, T>
and produces an &'a T. This is useful when avoiding passing a JSRef by
reference.
2014-09-26 18:37:26 -07:00
Cameron Zwarich
78f061ee54
Improve the correctness of Root lifetimes
...
Use the new lifetime bounds feature of Rust to enforce that the
RootCollection field of Root outlives the jsref field. This still
doesn't enforce that the Root itself outlives the jsref field, and
doing this would require some sort of init dance.
2014-09-26 14:25:43 -07:00
bors-servo
c2d6d8084c
Merge pull request #3480 from zwarich/trailing-whitespace
...
Fix trailing whitespace tidy errors
Reviewed-by: larsbergstrom
2014-09-25 17:00:34 -06:00
Cameron Zwarich
ce2484a7ce
Fix trailing whitespace tidy errors
2014-09-25 13:48:07 -07:00
Ms2ger
c4d36b5721
Remove unused cx_for_dom_object function.
2014-09-25 22:35:38 +02:00
Ms2ger
1d00b28df0
Regroup uses of JS constants in utils.rs.
2014-09-25 22:35:38 +02:00
Ms2ger
47829a37a9
Move global_object_for_js_object to global.rs.
...
This appears to be a more sensible place for it (related to #433 ).
2014-09-25 22:35:37 +02:00
Manish Goregaokar
6f6a62e967
Address review comments
2014-09-24 19:35:41 +05:30
Manish Goregaokar
5336dd9853
Update docs
2014-09-24 05:44:53 +05:30
Manish Goregaokar
cc44a3b064
Use JSTraceable everywhere
2014-09-24 05:44:49 +05:30
Manish Goregaokar
85f79290a6
Add untraceable! macro
2014-09-24 02:35:40 +05:30
Ms2ger
d6321230de
Remove the glob import for UnionTypes.
2014-09-21 16:13:42 +02:00
Ms2ger
b40966981c
Share code to compute the type of a union.
...
This does not change the generated code.
2014-09-21 16:13:42 +02:00
Ms2ger
2dd5f2357e
Don't use a glob import for codegen::{PrototypeList, RegisterBindings}.
2014-09-21 14:21:51 +02:00
Keegan McAllister
dc86e83654
Eliminate warnings
2014-09-20 13:00:55 -07:00
Keegan McAllister
a640a7c5c3
Upgrade to rustc 0.12.0-pre (4d2af3861 2014-09-17 15:51:11 +0000)
2014-09-20 13:00:06 -07:00
Cameron Zwarich
2c8d51a37c
More progress in the &JSRef -> JSRef conversion
...
Change all of the <Class>Methods traits to take `self` instead of
`&self`.
2014-09-20 11:54:10 -07:00
Tetsuharu OHZEKI
54d3a0b280
Reintroduce Untraceable<T>.deref_mut() to make mem::replace() possible to Untracebale<T> field.
...
Some compile errors caused by the compiler's misreading comes back again :(
We re-use `deref()`explicitly to hide these errors.
2014-09-20 15:19:00 +09:00