Ms2ger
7ecc39e9ba
Rewrite Document::create_collection to work better with createNodeList.
2014-03-05 12:19:28 +01:00
Ms2ger
cd1d81e402
Pass a JS<Element> to the callback in createHTMLCollection.
2014-03-05 12:00:23 +01:00
Ms2ger
787108deaf
Pass &JS<Window> to the Wrap functions in codegen.
2014-03-04 15:08:44 +01:00
Ms2ger
23b7277b54
Pass &JS<Window> to reflect_dom_object.
2014-03-04 14:13:58 +01:00
Manish Goregaokar
8b425fb8cf
Make document.getElementsByTagname return a NodeList; consolidate element collection to collectElement; fix #1744
2014-03-04 02:19:32 +05:30
Saurabh Anand
5c5cb3e9a7
Move Error, Fallible, ErrorResult out of utils.rs ( fixes #1749 )
2014-02-28 13:32:00 +05:30
bors-servo
1a171129dc
auto merge of #1771 : lpy/servo/issue1742, r=Ms2ger
...
see #1742
2014-02-27 05:55:47 -05:00
lpy
f9f82ff4e6
Add check for non-Text children for document.title.( fixes #1742 )
2014-02-27 14:40:35 +08:00
Ms2ger
25ee5270d1
Only register the new ID from after_set_attr, and remove update_idmap.
2014-02-26 14:50:57 +01:00
Ms2ger
33792db657
Move ID management on binding to and unbinding from tree into Element.
2014-02-26 14:50:57 +01:00
Ms2ger
2cbf7f4c7a
Rewrite Document::SetTitle to use a match.
2014-02-25 09:34:29 +01:00
Ms2ger
870ccd95d2
Remove DocumentTypeId.
2014-02-24 22:35:28 +01:00
Ms2ger
5ede84fa46
Remove document::DocumentType ( fixes #1730 ).
2014-02-24 22:28:27 +01:00
Ms2ger
7190feb5e3
Move HTMLDocument members to Document.
2014-02-24 22:17:33 +01:00
Ms2ger
2c8107e811
Remove methods from IDL that don't do anything useful.
2014-02-24 22:12:04 +01:00
Josh Matthews
625325434b
Implement JSManaged for DOM objects.
2014-02-24 15:16:42 -05:00
Ms2ger
6681476713
Use push_str instead of operator + for efficiency.
2014-02-16 10:25:12 +01:00
Ms2ger
e45b7fa22d
Use eq() and eq_slice() less, and map_default() more.
2014-02-16 10:24:24 +01:00
Adam Sinnett
ffcd3833de
Change Text, Comment and ProcessingInstructions parent name from element to characterdata
...
All other node's parent type names reflect the actual type of the parent. This change extends that convention to the indicated nodes.
closes #1594
2014-02-15 13:52:33 -08:00
Ms2ger
59184bf6e1
Move DOMString into servo_util.
2014-02-14 12:48:51 +01:00
Bruno de Oliveira Abinader
6fde4f82e7
Added refs to Document's DOM spec
2014-02-10 17:17:07 -04:00
bors-servo
14ee9218e4
auto merge of #1634 : brunoabinader/servo/document-fromnode, r=jdm
...
TSIA.
@jdm mentioned to use ```AbstractDocument::from_box``` internally, though.
2014-02-06 15:46:41 -05:00
Bruno de Oliveira Abinader
b19e31942e
Provide AbstractDocument::from_node(node: AbstractNode)
...
TSIA.
2014-02-06 16:33:16 -04:00
Bruno de Oliveira Abinader
ac8c659d2b
Implement document.createProcessingInstruction
...
Spec:
http://dom.spec.whatwg.org/#dom-document-createprocessinginstruction
This is a sub-task for #1428 .
2014-02-06 16:11:31 -04:00
Bruno de Oliveira Abinader
a6c897e445
Implement document.characterSet
...
Spec:
http://dom.spec.whatwg.org/#dom-document-characterset
This is a sub-task for #1428 .
2014-02-06 07:46:24 -04:00
Bruno de Oliveira Abinader
56572a2814
Implement document.compatMode
...
Spec:
http://dom.spec.whatwg.org/#dom-document-compatmode
This is a sub-task for #1428 .
2014-01-30 19:12:19 -04:00
Bruno de Oliveira Abinader
43416ef91f
Implement document.URL & document.documentURI
...
Specs:
http://dom.spec.whatwg.org/#dom-document-url
http://dom.spec.whatwg.org/#dom-document-documenturi
This is a sub-task for #1428 .
2014-01-30 10:41:24 -04:00
Simon Sapin
624e2714d4
Move script::dom::namespace into util, in order to use it from style later.
2014-01-25 12:14:06 -08:00
bors-servo
d11e431887
auto merge of #1533 : metajack/servo/unsafe-get-attr, r=jdm
...
The old code was used by both layout and script, but was erroneously
borrowing for the layout case (which causes parallelism
problems). script now uses only `value_ref()` or `get_attribute()`, and
layout now has its own unsafe version that dances around the borrows of
`@mut Attr`.
2014-01-22 16:28:20 -08:00
Jack Moffitt
c443bcbfff
Change get_attr()
to get_attr_val_for_layout()
.
...
The old code was used by both layout and script, but was erroneously
borrowing for the layout case (which causes parallelism
problems). script now uses only `value_ref()` or `get_attribute()`, and
layout now has its own unsafe version that dances around the borrows of
`@mut Attr`.
2014-01-22 17:02:21 -07:00
Bruno de Oliveira Abinader
1067da7df8
Basic support for Document::contentType
...
Spec:
http://dom.spec.whatwg.org/#dom-document-contenttype
This is a subtask for #1428 , #1510 and #1526 .
2014-01-21 12:48:09 -04:00
Bruno de Oliveira Abinader
cdf29d4394
Remove Document's unused 'title'
...
There is no current use for this variable.
This is a subtask for #1428 .
2014-01-17 10:00:50 -04:00
Bruno de Oliveira Abinader
60dd40f412
Add DOMImplementation skeleton
...
Creates a DOMImplementation struct corresponding to DOMImplementation
WebIDL. Also implements a getter for Document::implementation.
Closes #1486 .
2014-01-14 13:20:36 -04:00
Bruno de Oliveira Abinader
742ad9cd24
Implement Document::doctype
...
Closes #1482 .
2014-01-13 15:45:34 -04:00
Tetsuharu OHZEKI
fd0dadbddf
Enable only remove operation for Document::update_idmap().
2014-01-13 23:10:21 +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
Shamir Khodzha
8bb1724c1e
implemented iterator for child elements
2014-01-03 21:52:22 +04:00
Ms2ger
95913d1fed
Pass a Namespace to Element::get_attr.
2013-12-23 13:03:52 +01: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
8f886e599e
layout: Stop exposing raw Element
types to layout as well.
...
This should make layout memory-safe as is, though we will need to do
more stuff for incremental reflow and parallelism.
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
Patrick Walton
199ca33b72
script: Make trees less generic
2013-12-17 13:46:14 -08:00
Keegan McAllister
0238410b47
Allow setting id, class, style without a full reflow
...
Instead we do selector matching again, then diff the style structs to set the
"restyle damage" bits which are used to prune reflow traversals.
Also don't force a reflow when timers finish, because individual DOM methods
should already take care of that.
2013-12-12 14:43:26 -08:00
Simon Sapin
b290823f4d
Fix #1264 : support namespaced attribute selectors.
2013-12-10 17:53:12 +00: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
Josh Matthews
f9f9c42ab7
Ensure that it's safe to modify the DOM node pointers before doing so. Fixes #1224 .
2013-12-02 19:25:11 -05:00