Commit graph

202 commits

Author SHA1 Message Date
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
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
Keegan McAllister
93e10eaf20 Call Element::after_set_attr only for null namespace 2013-12-12 14:43:26 -08:00
Ms2ger
7f4283f4bc Rename some 'new' functions to 'new_inherited'. 2013-12-12 14:34:58 +01:00
Simon Sapin
b290823f4d Fix #1264: support namespaced attribute selectors. 2013-12-10 17:53:12 +00:00
Simon Sapin
61c7f2f220 Change Namespace::to_str() to not allocate and return a reference. 2013-12-09 15:10:09 +00:00
Daniel Glazman
28575c20bf add namespaces to elements 2013-12-09 15:55:51 +01:00