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
Josh Matthews
225ec3ed4e
Really fix #3738 by only processing iframe src attributes during parsing.
2014-10-23 18:58:34 -04:00
Ms2ger
903f3fa729
Cleanup Document::Title.
2014-10-23 18:21:33 +02:00
Ms2ger
fff0491c01
Move the methods on bare Document onto DocumentHelpers.
2014-10-23 18:21:02 +02:00
Ms2ger
d643ade7e8
Introduce LayoutDocumentHelpers::is_html_document_for_layout for LayoutElementHelpers::html_element_in_html_document_for_layout.
2014-10-23 18:20:11 +02:00
Ms2ger
32bcc192b0
Cleanup some Document methods.
2014-10-23 18:20:11 +02:00
Josh Matthews
539c21f380
Implement Document.readyState. Prevent iframes from notifying the compositor after the initial parse. Fixes #1720 . Fixes #3738 .
2014-10-23 10:55:59 -04:00
bors-servo
470d27a668
auto merge of #3776 : saneyuki/servo/macro, r=jdm
...
Fix #3755
This doesn't convert some specialized event handlers (e.g. `HTMLBodyElement`'s ones, `HTMLElement.GetOnload()`).
2014-10-22 22:30:29 -06:00
Tetsuharu OHZEKI
0a84c5d479
Macroize event handler getters and setters.
2014-10-23 13:03:58 +09:00
Edit Balint
daf9e59869
Make DOM getters that return &JS<T> return Temporary<T> instead #3707
2014-10-22 19:05:25 +02:00
Bruno de Oliveira Abinader
bbab8831e0
Usage of JSRef<Attr> in before_remove_attr & after_set_attr
...
JSRef<Attr> does not require allocating a DOMString for value, which are
unused in most cases. It also provides more access to Attr data.
2014-10-22 11:13:58 -04:00
Tetsuharu OHZEKI
71b4143d32
Use DOMRefCell for XMLHttpRequest.
2014-10-22 10:01:01 +09:00
Tetsuharu OHZEKI
6d089a87d5
Use DOMRefCell for URLSearchParams.
2014-10-22 10:01:01 +09:00
Tetsuharu OHZEKI
38ddddd1ca
Use DOMRefCell for ServoHTMLParser.
2014-10-22 10:01:01 +09:00
Tetsuharu OHZEKI
36d8dc5a42
Use DOMRefCell for Window.
2014-10-22 10:01:01 +09:00
Tetsuharu OHZEKI
7e7c610837
Use DOMRefCell for Node.
...
Altough LayoutDataRef is touched, we don't use DOMRefCell in it becasuse
it's expected to manipulate in other task.
2014-10-22 10:01:01 +09:00
Tetsuharu OHZEKI
d8c4588f0e
Use DOMRefCell for HTMLInputElement.
2014-10-22 10:01:00 +09:00
Tetsuharu OHZEKI
4c72727a56
Use DOMRefCell for HTMLImageElement.
2014-10-22 10:01:00 +09:00
Tetsuharu OHZEKI
f33e09d8f8
Use DOMRefCell for FormData.
2014-10-22 10:01:00 +09:00
Tetsuharu OHZEKI
752c821e43
Use DOMRefCell for EventTarget.
2014-10-22 10:01:00 +09:00
Tetsuharu OHZEKI
1aefa5423a
Use DOMRefCell for Event.
2014-10-22 10:01:00 +09:00
Tetsuharu OHZEKI
ab2d3bc1bb
Use DOMRefCell for Document.
2014-10-22 10:01:00 +09:00
Clark Gaebel
a5bb2f299f
more efficient preorder DOM traversals
2014-10-21 10:01:15 -07: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
Gilles Leblanc
a31849df11
Make HTMLFormElementHelpers::submit take an enumerated argument instead of a boolean
...
Fixes #3677
2014-10-16 20:57:55 -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
bors-servo
1de2fb3721
auto merge of #3695 : saneyuki/servo/cell, r=jdm
...
#3050
2014-10-16 00:03:18 -06:00
bors-servo
9af0900060
auto merge of #3684 : Manishearth/servo/dom_struct, r=jdm
...
This attribute implies #[jstraceable], #[privatize], and #[must_root].
2014-10-15 23:24:20 -06:00
Manish Goregaokar
3f2cbb275b
Use #[dom_struct] everywhere
2014-10-16 10:20:18 +05:30
bors-servo
84b2fe54b9
auto merge of #3694 : saneyuki/servo/node, r=jdm
...
`Node.unsafe_get_flags()` returns `*const NodeFlags`, but `NodeFlags` has only `u8` length.
So We should just returns a raw value instead of any pointers.
2014-10-15 22:45:19 -06:00
bors-servo
a6001329b8
auto merge of #3693 : ehsan/servo/3248, r=jdm
...
This fixes #3248 .
r? @jdm. Please review for mistakes mercilessly! Also, I got a host of test failures when running the worker tests, not sure if these tests are expected to pass locally or not.
2014-10-15 22:06:19 -06:00
bors-servo
f94228d9f9
auto merge of #3662 : mukilan/servo/worker_timer, r=jdm
...
Closes issue #3236
2014-10-15 20:48:22 -06:00
Tetsuharu OHZEKI
2bdcc0e2c0
Use DOMRefCell<T> for HTMLInputElement's field that is borrowed from other tasks.
2014-10-16 11:17:00 +09:00
Tetsuharu OHZEKI
0d447394b2
Removes Node.unsafe_get_flags().
...
`Node.unsafe_get_flags()` returns `*const NodeFlags`,
but `NodeFlags` has only `u8` length.
We should just returns a raw value instead of any pointers.
2014-10-16 11:04:17 +09: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
ab90c718eb
Add the comment about to use mem::transmute()
for values contained in DOMRefCell.
2014-10-16 10:48:23 +09:00
Mukilan Thiyagarajan
0d7e13f646
Issue #3236 - Implement timers (setTimeout/setInterval) for workers
2014-10-16 05:59:44 +05:30
Ms2ger
55e01157e7
Remove obsolete comments about cycles.
...
The tracing setup has ensured that the cycles can be collected for a long time
now.
2014-10-16 00:43:30 +02:00
Ms2ger
d9202f8169
Remove the reflector field from Document.
...
This field became unused in commit 99a36cbeb6
.
2014-10-15 16:03:22 +02:00
Tetsuharu OHZEKI
b42a91d0e9
Use DOMRefCell<T> in CharacterData.
2014-10-15 13:44:02 +09:00
Tetsuharu OHZEKI
fb98384fa5
Use DOMRefCell<T> in Element.
2014-10-15 13:44:02 +09:00
Tetsuharu OHZEKI
2d5d1e36ad
Use DOMRefCell<T> in Attr.
2014-10-15 13:41:03 +09: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
bors-servo
56989b8dec
auto merge of #3640 : cgaebel/servo/incremental-flow-construction, r=pcwalton
...
This also hides the not-yet-working parts of incremental reflow behind a runtime
flag. As I get the failing reftests passing, I'll send pull requests for them one
by one.
2014-10-14 16:51:30 -06: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
Clark Gaebel
f552e2f750
try to reset flows which need reflow, since reflow isn't yet idempotent
2014-10-14 10:33:46 -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