Commit graph

57 commits

Author SHA1 Message Date
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
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
438d121cd8 Implement DocumentFragment. 2013-10-12 15:14:09 +02:00
Ms2ger
98cdf5c118 Implement Document.createComment. 2013-10-11 12:40:35 +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
5ed8b9e83f Rename |wrapper| to |reflector_| in Reflectable implementations for DOM objects. 2013-10-09 12:21:38 +02:00
Bobby Holley
92e91c58da Rename the |wrapper| field in Reflector. 2013-10-09 12:18:17 +02:00
Bobby Holley
549ac6a29b Rename some local variables and shorten some lines.
This was done manually, and might benefit from a more careful review.
2013-10-09 12:15:56 +02:00
Bobby Holley
622aa76515 Rename WrappableDocument stuff. 2013-10-09 12:13:18 +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
2cbe2d7ce9 Rename WrapperCache to Reflector.
I think the abstraction from the raw JSObject is still probably worthwhile for
now.
2013-10-09 12:07:41 +02:00
Bobby Holley
0a0599ad9b Rename CacheableWrapper to Reflectable. 2013-10-09 12:03:18 +02:00
bors-servo
77f8dba48b auto merge of #1016 : Ms2ger/servo/ownerdoc, r=jdm 2013-10-08 05:16:01 -07:00
Ms2ger
388f685549 Cleanup some code. 2013-10-07 16:30:34 +02:00
Ms2ger
e43505d641 Remove Document::set_root.
All callers have an AbstractDocument, and this makes my life easier later.
2013-10-07 15:17:47 +02:00
Ms2ger
179582d939 Remove unnecessary mutability. 2013-10-06 09:15:38 +02:00
Ms2ger
17796725f4 Address review comments. 2013-10-06 09:02:12 +02:00
Ms2ger
c93d13b0da Don't require passing a root element to Document::new (needed for issue #888). 2013-10-05 21:42:13 +02:00
Luis de Bethencourt
2dbd065d91 Rename the element field of the DOM Node hierarchy
Renamed htmlelement, and element

Fixes #924
2013-09-19 19:39:38 -04:00
Keegan McAllister
73c1a12f30 bindings: Return errors in Result rather than setting an out parameter
Fixes #909.
2013-09-18 18:07:37 -07:00
Keegan McAllister
4b0680a136 Replace our rust_box with std::unstable::raw::Box
This will keep us in sync with compiler changes.  In fact we had the 'prev' and
'next' fields in the wrong order (but we aren't using them).
2013-09-18 14:57:12 -07:00
Keegan McAllister
68ddc6b4ab Make DOMString an alias for Option<~str>
Fixes #898.
2013-09-18 14:46:42 -07:00
Josh Matthews
d465abdb1c Make all DOM manipulation wait until it's safe to do so (ie. all reflows for the page have completed). Fix a race where a newly-initiated reflow would be considered complete when receiving the completion notice for the previous reflow. 2013-09-16 23:41:34 -04:00
Josh Matthews
37787d55d0 Pass the AbstractNode into the Node.textContent setter. 2013-09-16 23:39:16 -04:00
Ms2ger
b5457f7910 Introduce a createText function. 2013-09-14 11:30:22 -07:00
Jack Moffitt
0695e09568 Make CreateElement comply with the spec. 2013-09-14 09:07:20 -06:00
Josh Matthews
8ae725146c Make Window store an @Page instead of a *Page and remove a bunch of unsafe code. 2013-09-12 14:45:47 -07:00
Josh Matthews
4ec428b9d6 Trigger a reflow when nodes are appended and removed from the document. Fixes #907. 2013-09-12 10:17:00 -07:00
Josh Matthews
636c30affe Add trace hooks for Window and Document, and remove explicit rooting for the root DOM node. Fixes #901. 2013-09-11 12:18:23 -07:00
Jack Moffitt
227bb95213 Add document.createElement and document.createTextNode.
This re-uses the parser's node creation code. That could probably be put
somewhere nicer. Suggestions welcome!
2013-09-10 16:21:58 -06:00
Brian Anderson
9624148f18 Merge remote-tracking branch 'origin/master' into HEAD
Conflicts:
	src/components/script/dom/bindings/proxyhandler.rs
	src/components/script/dom/bindings/text.rs
2013-08-29 16:04:52 -07:00
Brian Anderson
1026556477 Update Rust 2013-08-29 15:36:36 -07:00
Josh Matthews
d31e308d3f Remove many long ugly lists of imports of HTML element types. They can now be obtained via dom::types::*, which is autogenerated. 2013-08-27 17:38:27 -04:00
Keegan McAllister
a2d9810b69 Update Rust version again
This gets us the new runtime.
2013-08-15 13:56:29 -07:00
Keegan McAllister
307f1074d3 For loops and misc changes 2013-08-15 13:56:29 -07:00
Keegan McAllister
1bdaff0fad Reorganize tree ref / node traits
rustc is no longer happy with

    impl<NR:TreeNodeRef<N>,N:TreeNode<NR>> TreeUtils for NR
2013-08-15 13:55:40 -07:00
Yusuke Suzuki
6f2c24eca7 Generate bindings for HTMLTitleElement 2013-08-09 16:41:25 -04:00
Youngsoo Son
133cf9caf1 Simplify HTMLCollection predicates 2013-08-09 12:54:06 +09:00
Junyoung Cho
00c3ffb7a4 Add a getter of 'document.head' according to HTML spec.
Add a getter and a setter of 'document.title' according to HTML spec.
Modify the test file.
2013-08-08 09:42:56 +09:00
Josh Matthews
9a545b13c3 Generate bindings for HTMLHeadElement. 2013-08-05 11:29:12 -04:00
Josh Matthews
fd4efad70c Generate bindings for Node, CharacterData, Text, Element, and HTMLElement. Hook up text nodes to use the new bindings. 2013-08-05 11:29:12 -04:00
Josh Matthews
c9bc2046f6 Fill out various proxy binding traps as part of making setters work. Add named getter and setter and indexed getter support, as well as proxy object expandos. Fixes #660. 2013-08-03 13:48:09 -04:00
Josh Matthews
a2bdab7989 Generate bindings for Window. 2013-07-30 16:30:46 -04:00
Josh Matthews
5546f2105b Generate HTMLDocument bindings. Introduce invariant into generated bindings that associated DOM classes are named the same as their interfaces, so Event and Event_ need to be swapped. 2013-07-30 16:28:02 -04:00