Commit graph

275 commits

Author SHA1 Message Date
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
Ryan Choi
ecd44fe9a8 removing unnecessary to_owned 2013-12-06 17:50:26 +09: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
Tetsuharu OHZEKI
aa72c413ed Enable to update id attribute for Document.getElementById(). (#740) 2013-11-23 11:53:45 +09:00
Tetsuharu OHZEKI
072ff20140 Use 'match' instead of 'if'. 2013-11-23 11:53:45 +09:00
Ms2ger
871d2f796c Remove an unused lifetime parameter from Element::get_attribute. 2013-11-14 19:49:36 +01:00
Tetsuharu OHZEKI
f5ef4365f4 Stop passing DOMStrings via borrowed pointer. (#1201) 2013-11-14 20:35:36 +09:00
bors-servo
82dd9b5699 auto merge of #1251 : Ms2ger/servo/attr-localname, r=kmcallister 2013-11-13 19:22:39 -08:00
Ms2ger
d57c3a8149 Make Attr::local_name always initialized. 2013-11-13 20:38:51 +01:00
Ms2ger
591de8cff5 Cleanup attribute setting functions a bit. 2013-11-13 17:38:08 +01:00
Josh Matthews
249cc6e38f Implement Element.attributes. 2013-11-13 02:09:12 +09:00
Ms2ger
08afc6d19d Don't pass nullable strings to native DOM methods that want non-nullable strings. Fixes #1207. 2013-11-12 13:57:18 +01:00
Ms2ger
803cd4b7cf Make DOMString represent a non-nullable string. 2013-11-12 13:32:53 +01:00
James Graham
15b9d4d199 Initial support for Attr and namespaces. 2013-11-12 17:39:04 +09:00
Simon Sapin
74dfc3b66a Add :any-link (Level 4), :link and :visited selectors.
All links are considered "unvisited" for now.
2013-11-07 15:06:17 +00:00
Ms2ger
80a6103f7d Remove Reflectable::GetParentObject. 2013-11-06 21:56:47 +01:00
Ms2ger
53731b62ae Remove Reflectable::wrap_object_shared. 2013-11-06 16:40:16 +01:00
bors-servo
b1c068b203 auto merge of #1125 : Ms2ger/servo/ClientRectList, r=jdm 2013-10-24 07:42:59 -07:00
bors-servo
d222443b38 auto merge of #1117 : Ms2ger/servo/HTMLCollection, r=kmcallister 2013-10-24 06:22:16 -07:00
Ms2ger
8cb4976136 Cleanup HTMLCollection binding. 2013-10-23 20:59:14 +02:00
Ms2ger
6af555ab23 Cleanup ClientRectList binding. 2013-10-23 20:44:22 +02:00
Ms2ger
f75568e939 Cleanup ClientRect binding. 2013-10-23 20:15:36 +02:00
Seo Sanghyeon
b2431912d3 Use the new style system
Credits to:
    Deokjin Kim
    Ilyong Cho
    Jaeman Park
    Junyoung Cho
    Ryan Choi
    Sangeun Kim
    Yongjin Kim
    Youngmin Yoo
    Youngsoo Son
2013-10-23 16:49:35 +09:00
Jack Moffitt
94202661c0 Update to latest Rust. 2013-10-21 17:38:34 -06:00
Ms2ger
b90766404c Replace Document::{with_base, with_mut_base} by Document::{document, mut_document}. 2013-10-21 17:57:44 +02:00
bors-servo
5c725b31af auto merge of #1025 : saneyuki/servo/attr, r=metajack 2013-10-18 20:43:03 -07:00
Marcos Caceres
faf53fd05c Implemention of HTMLMainElement 2013-10-18 22:03:58 +01:00
Ms2ger
321e0373fa Merge BindingObject and Reflectable. 2013-10-18 17:02:16 +02:00