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
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
Bobby Holley
5ed8b9e83f
Rename |wrapper| to |reflector_| in Reflectable implementations for DOM objects.
2013-10-09 12:21:38 +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
Ms2ger
388f685549
Cleanup some code.
2013-10-07 16:30:34 +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
bea1c4f01e
Issue #852 - Implement the Node.textContent setter.
2013-09-14 11:30:22 -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
Ilyong Cho
0d4cfd0eb9
Add node.appendChild
2013-09-10 12:39:58 +09:00
Ilyong Cho
bcd7c0b8c6
Add node.removeChild
2013-09-10 11:35:31 +09:00
Ilyong Cho
995e4fdd11
Add some dom node tree implementations
2013-09-10 11:35:31 +09:00
bors-servo
0dd90c75d8
auto merge of #883 : jdm/servo/newglobal, r=kmcallister
...
Requires https://github.com/mozilla-servo/rust-mozjs/pull/34 .
2013-09-09 17:06:53 -07:00
Josh Matthews
da599c6ccf
Make the global object be the Window object. Fixes #833 .
2013-09-09 10:25:39 -07:00
Ms2ger
fe46fb231a
Handle doctype.textContent correctly.
...
I confused Doctype and DocumentFragment nodes when implementing.
2013-09-09 13:02:20 +02:00
Ms2ger
be2df5d024
Issue #852 - Implement the Node.textContent getter.
2013-09-05 21:20:36 +02:00
Keegan McAllister
51c639c380
Remove a layer of Option on LayoutData
...
The individual fields are also Options, and LayoutData::new() is a fine default
value.
2013-09-03 16:00:14 -07:00
Keegan McAllister
c22547a4ef
Embed layout data directly in Node
...
This eliminates
layout_data: Option<@mut ()>
and the unsafe casting around it, which was causing crashes on exit.
Fixes #762 .
2013-09-03 13:10:51 -07:00
Josh Matthews
75f1cbd76f
Remove all handwritten bindings code.
2013-08-30 13:13:46 -04:00
Josh Matthews
8070f02e39
Generate bindings for Comment and DocumentType.
2013-08-28 20:31:30 -04: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
Keegan McAllister
be061a9aa0
Library changes
2013-08-15 13:55:40 -07:00
Josh Matthews
ddf4bee6df
Generate HTMLIFrameElement bindings.
2013-08-08 09:34:08 -04: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
8e2c39d2dd
Generate bindings for HTMLImageElement.
2013-08-06 21:54:37 -04:00
Josh Matthews
65a33f60e5
Generate bindings for HTMLDivElement, and pass abstract type to methods that need access to the opaque wrappers.
2013-08-06 19:03:09 -04: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
Keegan McAllister
a9a5e90787
Move is_root() into AbstractNode
2013-08-01 15:31:57 -07:00
Keegan McAllister
c047a4b436
Replace some Option matching with higher order methods
...
This shrinks the code and should be easier to read if we are used to the
idioms.
Also change one copy to clone() while we're here.
2013-08-01 15:31:57 -07: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
Tim Kuehn
e9888b299c
structural changes to support Iframes
2013-07-29 11:03:17 -07:00
Josh Matthews
09d50147f7
Autogenerate DOM bindings for Document.
2013-07-28 12:04:11 -04:00
bors-servo
25fdcb3dca
auto merge of #608 : kmcallister/servo/script-exit, r=metajack
2013-07-22 13:33:20 -07:00
Keegan McAllister
4d76e7570e
Bump layout data ref count in unsafe_set_layout_data
...
We need this or else we double-free the layout data box and crash.
2013-07-22 10:04:28 -07:00
Jack Moffitt
52e8a9be28
Fix busted iterator.
2013-07-19 18:39:14 -06:00
Jack Moffitt
34106d7e45
Fix broken inline CSS parsing and add a iterator for children.
...
If '\r' appears in an inline <style> element, libhubbub splits the text nodes
there, creating multiple text children. The inline style logic assumed that
each <style> element had only one child.
The logic was moved to trigger when the style element is finished parsing
completely (including the children), and then the children are concatenated
before sending it to the parser.
2013-07-19 15:18:45 -06:00
bors-servo
821192d5a8
auto merge of #577 : jdm/servo/autogen, r=jdm,metajack
2013-07-12 11:27:29 -07:00
Josh Matthews
4f24ef1619
DOM bindings: Autogenerate list of prototypes and binding registration goop.
2013-07-12 14:06:23 -04:00