Commit graph

282 commits

Author SHA1 Message Date
Josh Matthews
fda77aa36b Eagerly reflect the navigator object. Fixes #1042. 2013-10-21 12:11:14 +02:00
bors-servo
5c725b31af auto merge of #1025 : saneyuki/servo/attr, r=metajack 2013-10-18 20:43:03 -07: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
9046085506 Make Blob create its binding eagerly. 2013-10-18 19:28:21 +02:00
Ms2ger
321e0373fa Merge BindingObject and Reflectable. 2013-10-18 17:02:16 +02:00
Tetsuharu OHZEKI
41dda86557 Enable to update Element's attributes. 2013-10-19 00:00:43 +09:00
Ms2ger
f585d218cb Remove unused DerivedWrapper implementations. 2013-10-18 16:13:35 +02:00
Ms2ger
3da1a206d8 Remove DerivedWrapper::wrap_shared, as it's unused. 2013-10-18 15:56:35 +02:00
bors-servo
ebe1c1353c auto merge of #1077 : kmcallister/servo/jsstr, r=jdm
This doesn't resolve the big questions of how Servo will represent strings; it's just about doing the conversion correctly for our existing types.
2013-10-17 16:34:30 -07:00
Keegan McAllister
5f14ee617b Check for allocation failure in domstring_to_jsval 2013-10-17 12:59:05 -07:00
bors-servo
79f4d9a47f auto merge of #1080 : Ms2ger/servo/get_jsobject-cast, r=jdm 2013-10-17 10:40:27 -07:00
Ms2ger
f58c7874b2 Remove an unnecessary cast::transmute call. 2013-10-17 19:35:53 +02:00
Ms2ger
c08e4fe36b Make Node.owner_doc private. 2013-10-17 18:44:26 +02:00
Ms2ger
25cae74093 Remove unused aTriedToWrap argument. 2013-10-17 16:43:28 +02:00
Keegan McAllister
2c302a4627 Convert between JS and Rust strings in a way that handles Unicode
This doesn't handle invalid UTF-16 and may not be efficient.  It's just a small
change to make things better until we decide what we're doing about strings in
the long run.

Fixes #1068.
2013-10-16 16:18:12 -07:00
bors-servo
6db57e6f72 auto merge of #1075 : SimonSapin/servo/newnewcss, r=kmcallister
I believe this is all the preparatory work discussed in #1006 and #1057: The new 'style' crate implements the whole style system (including parsing, matching and cascading) and only depends on cssparser and util, so that gfx, script and main can all depend on it.

Next: porting the layout code to this. (Really, this time! I think.)
2013-10-16 15:37:42 -07:00
Simon Sapin
a509755447 Failing for a blank line before the license, really? 2013-10-16 23:28:36 +01:00
Simon Sapin
b0f694d5b0 CSS: Use libutil’s traits in Selector matching to not depend on libscript. 2013-10-16 20:20:29 +01:00
Simon Sapin
6d808fbdd0 Move AbastractNode::is_element to the TreeNodeRef trait. 2013-10-16 19:22:44 +01:00
Simon Sapin
6c41be9c13 Add a with_imm_element_like() method.
… gives a generic element from a generic node.
2013-10-16 18:44:41 +01:00
Simon Sapin
62f1f03c16 Move Element::get_attr to a trait defined in util::tree
… and add a get_local_name() method to that trait.
2013-10-16 18:10:39 +01:00
Simon Sapin
a325905fa6 Move the gfx::geometry module to servo_util::geometry.
This is part of #1006, in order to use Au from the script crate
without introducing a circular crate dependency.
2013-10-16 14:55:07 +01:00
Tetsuharu OHZEKI
f08f44f8c6 Unify macros which generate binding codes. 2013-10-16 20:14:08 +09:00
Ms2ger
60b6d1bb57 Issue #1071 - Ensure that Documents always have a non-null Window. 2013-10-16 10:15:09 +02:00
Tetsuharu OHZEKI
f5e2b2ec67 Auto-generate some binding codes for HTMLElement, Element, CharacterData. 2013-10-16 00:37:15 +09:00
Tetsuharu OHZEKI
776ab67905 Rename the element field of the DOM Node hierarchy.
See #924
2013-10-16 00:20:20 +09:00
Tetsuharu OHZEKI
fc9a3baa71 Add line breaks for readability. 2013-10-16 00:02:34 +09: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
b34432471e Use Window::get_cx() in DocumentFragment::Constructor. 2013-10-14 21:06:00 +02:00
bors-servo
8d3c7a2ded auto merge of #1051 : Ms2ger/servo/private-root, r=jdm
In preparation for removing it as part of making Document a Node.
2013-10-14 10:22:00 -07:00
bors-servo
90baad3fff auto merge of #983 : saneyuki/servo/getid, r=jdm
This has not implemented these features yet:
* Update hashmap which is used for `getElementById()` when updating element attributes.
* Keep node order in tree.

However, this has the quality of that we can use this method for testcases.
2013-10-14 10:01:10 -07:00
bors-servo
5d00b52055 auto merge of #1050 : Ms2ger/servo/get_cx, r=jdm 2013-10-14 09:37:14 -07:00
Tetsuharu OHZEKI
db3b5c3c4c Basic Implementation of document.getElementById(), #740 2013-10-15 00:21:13 +09:00
Tetsuharu OHZEKI
f9be872e61 Pass AbstractNode to Node<ScriptView>.add_to_doc(). 2013-10-14 23:01:03 +09:00
Ms2ger
b6b2606c96 Make Document::root private, in preparation for removing it as part of making Document a Node. 2013-10-13 14:08:37 +02:00
Ms2ger
da2cf6cbd7 Implement Window::get_cx() to reduce code repetition. 2013-10-13 12:06:32 +02: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
cfc9f4956a Reindent some match expressions. 2013-10-10 23:05:30 +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
Bobby Holley
e6be738d97 Fix infinite-looping reflector() implementation for WindowProxy. 2013-10-10 13:11:24 +02:00
Ms2ger
40106841f8 Address review comment and add fixmes. 2013-10-10 10:57:38 +02:00
Ms2ger
04319fdb68 Issue #888 - Node's owner document should never be None. 2013-10-10 10:57:38 +02:00
bors-servo
59d2d345c8 auto merge of #1013 : huonw/servo/text-iter, r=pcwalton
And 3 other minor clean-ups: removing a redundant `if`, a redundant function call, and using `slice_from` where it is possible.
2013-10-09 16:19:24 -07:00