Commit graph

212 commits

Author SHA1 Message Date
Ms2ger
a15cac53bc Don't use the Untraceable fields outside the module they're defined in.
This pattern will become illegal with the next Rust upgrade.
2014-03-12 14:30:19 +01:00
Bruno de Oliveira Abinader
d010861b75 Implemented {Document,Element}.getElementsByClassName 2014-03-07 11:10:56 -04:00
Bruno de Oliveira Abinader
e1499b610e Implemented {Document,Element}.getElementsByTagNameNS 2014-03-07 11:10:56 -04:00
Bruno de Oliveira Abinader
d22dbb53ca Implemented {Document,Element}.getElementsByTagName 2014-03-07 11:10:55 -04:00
Ms2ger
6291aac170 Pass &JS<Window> to some constructors. 2014-03-04 14:10:33 +01:00
lpy
77938bf6f6 Implement document_from_node and window_from_node helpers.(fixes #1761) 2014-03-01 21:57:37 +08:00
Josh Matthews
fa542e5de7 De-@mut the script crate. 2014-02-28 13:42:03 -05:00
bors-servo
021d32368d auto merge of #1781 : hgentry/servo/mozilla-servo, r=metajack
Simple change. I hope I'm using github correctly; I'm not too familiar with the PR system. Fixes #1777.
2014-02-28 11:37:40 -05:00
Saurabh Anand
5c5cb3e9a7 Move Error, Fallible, ErrorResult out of utils.rs (fixes #1749) 2014-02-28 13:32:00 +05:30
hgentry
39e571ae4e Renamed HTMLIframeElementTypeId to HTMLIFrameElementTypeId 2014-02-27 15:35:27 -05:00
Ms2ger
59416c9431 Remove no-op implementations from Element and add some spec links. 2014-02-27 12:33:32 +01: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
86899b6aaf Call unregister_named_element rather update_idmap from before_remove_attr. 2014-02-26 14:50:57 +01:00
Ms2ger
432e9cb3a7 Call after_remove_attr before removing the attribute, and rename it before_remove_attr. 2014-02-26 14:50:57 +01:00
Ms2ger
fdd17b4139 Pass a non-Option DOMString to after_remove_attr. 2014-02-26 14:50:57 +01:00
Ms2ger
58b317837b Cleanup Element::set_attribute. 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
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
Josh Matthews
625325434b Implement JSManaged for DOM objects. 2014-02-24 15:16:42 -05:00
Youngmin Yoo
13f9a66632 Impl Basic support for object element 2014-02-20 17:31:16 +09:00
Youngmin Yoo
7b56e75adb Support base_url in stylesheet 2014-02-19 17:23:50 +09:00
Josh Matthews
70e8a5e90f Ensure id attributes on elements only affect elements present in a document. 2014-02-18 15:12:00 -05:00
bors-servo
8f63dff8f8 auto merge of #1667 : brunoabinader/servo/dom-element-refs, r=jdm
This is a sub-task for #1660.
2014-02-18 13:35:16 -05:00
Ms2ger
e45b7fa22d Use eq() and eq_slice() less, and map_default() more. 2014-02-16 10:24:24 +01:00
Ms2ger
ecc07e3b49 Use DOMString instead of ~str in a few places. 2014-02-16 10:22:47 +01:00
Ms2ger
59184bf6e1 Move DOMString into servo_util. 2014-02-14 12:48:51 +01:00
Bruno de Oliveira Abinader
93e539d636 Fixed FIXME message as pointed out by jdm 2014-02-11 09:45:05 -04:00
Bruno de Oliveira Abinader
9b56e2cc09 Added refs to live HTMLCollections issue 2014-02-11 09:35:52 -04:00
Bruno de Oliveira Abinader
7f5e27fd9d Added refs to Element's DOM spec
This is a sub-task for #1660.
2014-02-11 09:27:45 -04:00
Simon Sapin
fdafc3701f Make get_attr() take a &Namespace rather than Option<~str> 2014-01-25 12:23:04 -08: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
Simon Sapin
ae0cbda327 Change Namespace::from_str to take &str, fix #1367 2014-01-25 11:50:06 -08:00
Simon Sapin
b8556afeeb Do not lowercase names for *AttributeNS APIs. (Move lower-casing to callers.) 2014-01-25 11:25:42 -08:00
Ms2ger
d6b5015d7a Revert PR #1554 because it's wrong. 2014-01-25 09:50:03 +01:00
Patrick Walton
1b786fe414 script: Avoid an allocation when getting attribute data.
15% improvement in selector matching performance on the rainbow page.
2014-01-24 16:58:07 -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
James Graham
7aee1cae84 Implement innerHTML getter for HTML documents
XML case is not yet implemented.
2014-01-14 13:10:05 +00:00
Tetsuharu OHZEKI
7a9ecffaa0 Implement Element.removeAttribute()/removeAttributeNS(). 2014-01-13 23:12:08 +09:00
Tetsuharu OHZEKI
31e2f22d20 Add the comment to explain the dual declaration. 2014-01-13 23:10:21 +09:00
Tetsuharu OHZEKI
fd0dadbddf Enable only remove operation for Document::update_idmap(). 2014-01-13 23:10:21 +09:00
Tetsuharu OHZEKI
8dc5fe0fe5 Split up the utility function to make internal attribute's namespace. 2014-01-13 23:10:21 +09:00
Tetsuharu OHZEKI
617a95ff5b Remove needless code.
This `OK(())` should be propagated from `Element.set_attribute()`.
2014-01-13 23:07:00 +09:00
Jack Moffitt
a7ef1cd35e Upgrade to latest Rust. 2014-01-12 19:45:45 -07:00
Ms2ger
4c0e7dda7b Make Element::set_attribute not lower-case the name argument.
In particular, for SetAttributeNS, we should not change the case.
2014-01-04 18:06:57 +01:00
Ms2ger
29897580e1 Remove the hashmap for attributes. 2014-01-03 18:24:00 +01:00
patrick kim
e0a04fff46 fix unit of clientrect &
add width,height test in src/test/html/content/test_getBoundingClientRect.html
2014-01-03 17:25:46 +09:00
Ms2ger
6e6d45ca26 Introduce methods to simplify implementing reflecting attributes. 2013-12-24 10:24:35 +01:00
Ms2ger
95913d1fed Pass a Namespace to Element::get_attr. 2013-12-23 13:03:52 +01:00
Ms2ger
e64ee3557e Pass a Namespace to Element::get_attribute. 2013-12-23 12:21:18 +01:00