Commit graph

469 commits

Author SHA1 Message Date
Tetsuharu OHZEKI
7a9ecffaa0 Implement Element.removeAttribute()/removeAttributeNS(). 2014-01-13 23:12:08 +09:00
bors-servo
943ab4a4f0 auto merge of #1473 : metajack/servo/rustup-20131219, r=jdm 2014-01-12 19:16:21 -08:00
Jack Moffitt
a7ef1cd35e Upgrade to latest Rust. 2014-01-12 19:45:45 -07:00
Bruno de Oliveira Abinader
b5eba001ef Fix to avoid attribute name clash between Document/HTMLDocument
Use children() instead of traverse_preorder(), and avoid having
GetHead() in both Document and HTMLDocument.

Closes #1465.
2014-01-08 16:44:47 -04:00
Bruno de Oliveira Abinader
17b35d52ff Implement Document::head()
Implementation details according to the specification below:
http://www.whatwg.org/specs/web-apps/current-work/#dom-document-head

This patch is for:
https://github.com/mozilla/servo/issues/1465
2014-01-07 15:51:45 -04:00
Bruno de Oliveira Abinader
ce434dfb3e Implement Document's 'body' attribute
Implement Document's 'body' attribute (getter and setter). Proper
implementation of setter requires Node::ReplaceChild(), which is
currently a stub and will be done on a later step.

This patch is for:
https://github.com/mozilla/servo/issues/1428
2013-12-20 10:58:03 -04:00
Patrick Walton
436b1e891d script: Eliminate the phantom type in Node, as it is no longer needed
for enforcing layout memory safety.
2013-12-17 18:07:41 -08:00
Patrick Walton
be69a503fe script: Eliminate the phantom type in favor of just whitelisting methods
that layout can safely call.

This is simpler. Currently, the set of methods is not safe, but I plan
to lock it down more soon.
2013-12-17 18:07:12 -08:00
Ms2ger
29a7405b4e Report exceptions to JS when the DOM implementation fails.
As a bonus, adds some debugging statements.
2013-12-05 16:14:02 +01:00
Keegan McAllister
5157eac238 Warning police
And fix some formatting.
2013-11-25 13:29:34 -08:00
bors-servo
f6646e17bf auto merge of #1270 : evilpie/servo/url, r=jdm
I wasn't sure how to store @window in Location, so I just made it use @Page for now. I was going to implement stringifier, but sadly some of the webidl stuff is like 1 year out of sync.
2013-11-24 15:52:04 -08:00
Tom Schuster
ccc7fa7be0 basic location 2013-11-24 22:40:24 +01:00
Tom Schuster
73e67568c1 Add FormData constructor 2013-11-24 22:37:28 +01:00
Tom Schuster
586dd6aed6 Add some more Blob methods/types 2013-11-15 17:56:11 +01:00
Tetsuharu OHZEKI
f5ef4365f4 Stop passing DOMStrings via borrowed pointer. (#1201) 2013-11-14 20:35:36 +09:00
Josh Matthews
249cc6e38f Implement Element.attributes. 2013-11-13 02:09:12 +09:00
Ms2ger
08afc6d19d Don't pass nullable strings to native DOM methods that want non-nullable strings. Fixes #1207. 2013-11-12 13:57:18 +01:00
Ms2ger
803cd4b7cf Make DOMString represent a non-nullable string. 2013-11-12 13:32:53 +01:00
James Graham
15b9d4d199 Initial support for Attr and namespaces. 2013-11-12 17:39:04 +09:00
Ms2ger
793d87f07d Rewrite jsval_to_str and introduce jsval_to_domstring. 2013-11-09 14:49:15 +01:00
Ms2ger
610d1649cd Introduce jsid_to_str to simplify jsval_to_str callers that have an id. 2013-11-09 14:05:53 +01:00
Ms2ger
edd9c1d5eb Remove WrapNativeParent and nearby cleanup. 2013-11-06 21:56:36 +01:00
Ms2ger
4074412107 Pass a Reflector to WrapNewBindingObject instead of a Reflectable, and rename it GetReflector. 2013-11-06 17:52:59 +01:00
Josh Matthews
bb97fd13f3 Add Event and EventTarget hierarchy via gross AbstractFoo mechanism. 2013-11-05 12:58:28 -05:00
Josh Matthews
7ecf5abbbd Generate code for handling callbacks. Implement add/removeEventListener and hacky dispatchEvent proof-of-concept. 2013-11-05 12:58:28 -05:00
Josh Matthews
06b1db8818 Import unmodified callbacks-related codegen source from Gecko. 2013-11-05 12:57:02 -05:00
bors-servo
352acbb833 auto merge of #1163 : metajack/servo/kmc-rust-upgrade, r=kmcallister
Most work courtesy of @kmcallister.

I already reviewed Keegan's work, so just the last two commits need attention.
2013-10-31 16:34:14 -07:00
Keegan McAllister
e2b7885b73 fmt! -> format! 2013-10-31 14:58:55 -06:00
Josh Matthews
99a36cbeb6 Make Document a Node. 2013-10-31 13:34:44 -04:00
Ms2ger
2ca1eede9a Implement insertBefore and reimplement appendChild. 2013-10-29 21:48:28 +01:00
Patrick Walton
baba35adc9 Revert "Make Document a Node." for breaking Acid1
This reverts commit 4e47d59165.

Conflicts:

	src/components/script/dom/domparser.rs
2013-10-24 15:08:09 -07:00
Josh Matthews
4e47d59165 Make Document a Node. 2013-10-24 18:07:46 +02:00
Ms2ger
e418e4d830 Remove no-op implementations from Document and HTMLDocument. 2013-10-21 19:51:12 +02:00
bors-servo
8dd462c38c auto merge of #1091 : marcoscaceres/servo/master, r=jdm 2013-10-18 19:22:08 -07:00
Marcos Caceres
faf53fd05c Implemention of HTMLMainElement 2013-10-18 22:03:58 +01:00
Ms2ger
40fde80e1a Implement the no-argument Blob constructor. 2013-10-18 19:30:32 +02:00
Ms2ger
25cae74093 Remove unused aTriedToWrap argument. 2013-10-17 16:43:28 +02:00
Tetsuharu OHZEKI
0de35fdc2f Implement HTMLTableDataCellElement & HTMLTableHeaderCellElement. 2013-10-15 22:37:06 +09:00
Tim Taubert
189bb6c95f Remove View type parameter from DocumentType 2013-10-14 17:32:38 -07:00
Ms2ger
f4edbb6b2e Remove some type variables and an explicit dereference. 2013-10-12 16:08:45 +02:00
Ms2ger
438d121cd8 Implement DocumentFragment. 2013-10-12 15:14:09 +02:00
Tim Taubert
9fe9145be4 implement NodeList and consolidate common scope and context retrieval 2013-10-11 07:34:38 -07:00
Ms2ger
98cdf5c118 Implement Document.createComment. 2013-10-11 12:40:35 +02:00
Ms2ger
a5233f2bc4 Support Node.nodeType and Node.nodeValue. 2013-10-10 22:09:34 +02:00
Bobby Holley
c4bbc4cd37 Introduce mutable/immutable variants of reflector() with named lifetimes, and kill unsafe casts. 2013-10-10 13:11:24 +02:00
Ms2ger
04319fdb68 Issue #888 - Node's owner document should never be None. 2013-10-10 10:57:38 +02:00
Bobby Holley
6bf740d967 Rename {get,set}_wrapper to {get,set}_jsobject. v1 2013-10-09 12:13:18 +02:00
Bobby Holley
62ddac8b6f Rename get_wrappercache() to reflector(). v1
I also updated some variable names in the codegen.
2013-10-09 12:11:25 +02:00
Bobby Holley
0a0599ad9b Rename CacheableWrapper to Reflectable. 2013-10-09 12:03:18 +02:00
Josh Matthews
bc81716c30 Make proxy finalizers retrieve the DOM object from the right slot. 2013-10-02 01:43:14 -04:00