Commit graph

41 commits

Author SHA1 Message Date
Ms2ger
1dad710063 Replace Root::deref() calls by Root::r() calls where possible.
This changes those calls that were already sound.
2015-01-01 20:36:43 +01:00
Ms2ger
b6117a57aa Replace the remaining to_string calls by into_string calls. 2014-12-31 10:34:44 +01:00
ProgramFOX
18d8ee6ce0 Added readonly flag for CSSStyleDeclaration 2014-12-28 17:39:07 +01:00
bors-servo
56d1b16d1b auto merge of #4173 : Manishearth/servo/a-more-dom-struct, r=kmcallister
Now `#[dom_struct]` also generates Reflectable impls, and there's another lint to ensure that a DOM struct only contains one bare DOM field (as the first field) or a Reflector.

A lot of this was generated by sed -- each autogenerated change has its own commit for easy review; these will be squashed later.
2014-12-27 22:12:45 -07:00
Manish Goregaokar
e9d1740e19 script: to_string() -> into_string() 2014-12-27 14:48:36 +01:00
Manish Goregaokar
552db382d6 Remove manual impls of Reflectors (autogen)
Obtained via:

 `find . -maxdepth 1 -type f -print0 | xargs -0 sed -z -i "s/\\nimpl Reflectable for[^{]*{[^}]*}[^}]*}\\n//"`
 `find . -maxdepth 1 -type f -print0 |xargs -0  grep -lZ dom_struct | xargs -0 grep -LZ  "reflector()\\|Reflector::new" |xargs -0 sed -z -i "s/use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object};/use dom::bindings::utils::reflect_dom_object;/"`

followed by semi-automated removal of leftover imports
2014-12-27 02:52:33 +05:30
Bruno de Oliveira Abinader
57c520d8cf Implement HTMLElement.dataset (fixes #2974). 2014-12-23 14:24:06 +01:00
Ms2ger
dc63735ca7 Revert PR #4038 for causing WPT failures. 2014-12-23 09:53:12 +01:00
Bruno de Oliveira Abinader
628ee92d73 Implement HTMLElement.dataset
Make DOMStringMap use related Element's custom attributes values.
2014-12-19 14:07:43 -04:00
Eduard Burtescu
5059a1b2ac Handle getting/setting onload for any element. 2014-12-19 06:29:04 +02:00
Josh Matthews
c8557c44a9 Merge CSS2Properties and CSSStyleDeclaration. 2014-12-18 12:54:03 -05:00
Josh Matthews
3cfe8ab53e Address review comments. 2014-12-18 12:54:02 -05:00
Josh Matthews
505e1855a3 Implement something like CSS value serialization. Fetch actual inline style declarations from owning elements. 2014-12-18 12:54:02 -05:00
Josh Matthews
2e14b653bf Add a style property to HTMLElement. 2014-12-18 12:54:02 -05:00
Ms2ger
466faac2a5 Update rustc to revision 3dcd2157403163789aaf21a9ab3c4d30a7c6494d. 2014-12-17 15:19:45 -05:00
Manish Goregaokar
e7b3caa386 Add oninput/onchange so tests work 2014-12-05 18:49:34 -08:00
Manish Goregaokar
a2f7e0fbd6 Address review comments 2014-12-05 18:34:51 -08:00
Manish Goregaokar
c89ec3910f Hook up synthetic click activation to script_task and <>.click() 2014-12-05 18:33:03 -08:00
bors-servo
82050d1e53 auto merge of #4130 : saneyuki/servo/cast, r=Manishearth
Fix #4124

This also introduce `BarCast::from_actual()` which is used for up-cast for dom's actual data types (non JS pointer values).
2014-11-28 09:24:44 -07:00
aakashjain
5a30bd00cb Implemented hidden, removed corresponding passed tests 2014-11-28 17:39:30 +05:30
Tetsuharu OHZEKI
106b7a3924 Remove HTMLElement.element(). 2014-11-28 06:02:03 +09:00
Ms2ger
bb9cad938b Implement HTMLElement#lang. 2014-11-06 15:28:52 +01:00
Ms2ger
45701002a3 Implement HTMLElement.title. 2014-11-05 22:08:36 +01:00
bors-servo
470d27a668 auto merge of #3776 : saneyuki/servo/macro, r=jdm
Fix #3755

This doesn't convert some specialized event handlers (e.g. `HTMLBodyElement`'s ones, `HTMLElement.GetOnload()`).
2014-10-22 22:30:29 -06:00
Tetsuharu OHZEKI
0a84c5d479 Macroize event handler getters and setters. 2014-10-23 13:03:58 +09:00
Bruno de Oliveira Abinader
bbab8831e0 Usage of JSRef<Attr> in before_remove_attr & after_set_attr
JSRef<Attr> does not require allocating a DOMString for value, which are
unused in most cases. It also provides more access to Attr data.
2014-10-22 11:13:58 -04:00
Manish Goregaokar
3f2cbb275b Use #[dom_struct] everywhere 2014-10-16 10:20:18 +05:30
Tim Taubert
df60f8b2c5 Privatize EventTarget and EventListenerEntry 2014-10-13 13:25:43 +02:00
Tim Taubert
9a52bb8310 Privatize InheritTypes 2014-10-13 11:13:12 +02:00
Tim Taubert
35f8270c64 Remove unnecessary deref()s (fixes #3586) 2014-10-09 15:01:54 +02:00
Gilles Leblanc
3a5a66d54e Take the prefix from createElementNS into account for HTML elements
Fixes #3139
2014-10-06 22:49:49 -04:00
Keegan McAllister
d50114c41d Use string-cache's Namespace type 2014-09-29 21:40:54 -07:00
Keegan McAllister
6429750b33 Eliminate servo_util::atom
We only needed this for Encodable, and now we use JSTraceable instead.
2014-09-29 18:39:36 -07:00
Simon Sapin
b3245fa407 Upgrade to rustc d2b30f7d3 2014-09-23 2014-09-29 17:41:45 +01:00
Manish Goregaokar
cc44a3b064 Use JSTraceable everywhere 2014-09-24 05:44:49 +05:30
Cameron Zwarich
d768ee77ad Convert various helper traits from &JSRef to JSRef
I converted them all with a few exceptions:

- Methods that were used by trait objects, since trait objects don't
  work with `self` methods.
- Methods that take an &'b JSRef<'a, T> and return an &'b. In reality,
  many (all?) could return an &'a instead, but this isn't allowed by the
  Deref trait.
- Methods that internally rely on the same issue with Deref.
- I left out the traits involved in layout entirely, even though not all
  of their methods suffer from one of the above problems.

There will probably be solutions to all of these problems in the future.
2014-09-20 11:54:11 -07:00
Cameron Zwarich
2c8d51a37c More progress in the &JSRef -> JSRef conversion
Change all of the <Class>Methods traits to take `self` instead of
`&self`.
2014-09-20 11:54:10 -07:00
Cameron Zwarich
4fa8725111 First steps of &JSRef -> JSRef conversion
Replace &JSRef with JSRef in the bulk of the generated code. This will
remove a level of indirection throughout all DOM code.

This patch doesn't change methods implemented on JSRef<T> to take `self`
rather than `&self`, and it leaves a few other uses of &JSRef, but those
changes can be made incrementally.
2014-09-19 13:39:17 -07:00
Manish Goregaokar
f5087e1490 Use #[must_root] for HTMLElements 2014-09-17 01:02:44 +05:30
Manish Goregaokar
30014c3919 Make Reflector #[must_root], propagate to non-HTMLElements 2014-09-17 01:02:41 +05:30
Jack Moffitt
c6ab60dbfc Cargoify servo 2014-09-08 20:21:42 -06:00
Renamed from src/components/script/dom/htmlelement.rs (Browse further)