Commit graph

123 commits

Author SHA1 Message Date
Simon Sapin
6d808fbdd0 Move AbastractNode::is_element to the TreeNodeRef trait. 2013-10-16 19:22:44 +01:00
Simon Sapin
6c41be9c13 Add a with_imm_element_like() method.
… gives a generic element from a generic node.
2013-10-16 18:44:41 +01:00
Simon Sapin
62f1f03c16 Move Element::get_attr to a trait defined in util::tree
… and add a get_local_name() method to that trait.
2013-10-16 18:10:39 +01:00
Ms2ger
60b6d1bb57 Issue #1071 - Ensure that Documents always have a non-null Window. 2013-10-16 10:15:09 +02:00
Tetsuharu OHZEKI
f5e2b2ec67 Auto-generate some binding codes for HTMLElement, Element, CharacterData. 2013-10-16 00:37:15 +09:00
Tetsuharu OHZEKI
0de35fdc2f Implement HTMLTableDataCellElement & HTMLTableHeaderCellElement. 2013-10-15 22:37:06 +09:00
bors-servo
90baad3fff auto merge of #983 : saneyuki/servo/getid, r=jdm
This has not implemented these features yet:
* Update hashmap which is used for `getElementById()` when updating element attributes.
* Keep node order in tree.

However, this has the quality of that we can use this method for testcases.
2013-10-14 10:01:10 -07:00
Tetsuharu OHZEKI
db3b5c3c4c Basic Implementation of document.getElementById(), #740 2013-10-15 00:21:13 +09:00
Ms2ger
da2cf6cbd7 Implement Window::get_cx() to reduce code repetition. 2013-10-13 12:06:32 +02:00
Tim Taubert
9fe9145be4 implement NodeList and consolidate common scope and context retrieval 2013-10-11 07:34:38 -07:00
Bobby Holley
c4bbc4cd37 Introduce mutable/immutable variants of reflector() with named lifetimes, and kill unsafe casts. 2013-10-10 13:11:24 +02:00
Ms2ger
04319fdb68 Issue #888 - Node's owner document should never be None. 2013-10-10 10:57:38 +02:00
Bobby Holley
549ac6a29b Rename some local variables and shorten some lines.
This was done manually, and might benefit from a more careful review.
2013-10-09 12:15:56 +02:00
Bobby Holley
6bf740d967 Rename {get,set}_wrapper to {get,set}_jsobject. v1 2013-10-09 12:13:18 +02:00
Bobby Holley
62ddac8b6f Rename get_wrappercache() to reflector(). v1
I also updated some variable names in the codegen.
2013-10-09 12:11:25 +02:00
Bobby Holley
2cbe2d7ce9 Rename WrapperCache to Reflector.
I think the abstraction from the raw JSObject is still probably worthwhile for
now.
2013-10-09 12:07:41 +02:00
Bobby Holley
0a0599ad9b Rename CacheableWrapper to Reflectable. 2013-10-09 12:03:18 +02:00
Ms2ger
388f685549 Cleanup some code. 2013-10-07 16:30:34 +02:00
Simon Sapin
20089e4bea New style sytsem: add selector matching
Also make scribt::dom::element::Element::get_attr ASCII case-insensitive
on attribute names, per spec:
http://dom.spec.whatwg.org/#dom-element-getattribute
2013-10-02 00:28:14 +01:00
Luis de Bethencourt
cfd726f7d6 Rename the node field of the DOM node hierarchy
Renamed the Node elements

Fixes #924
2013-09-19 19:39:38 -04:00
Luis de Bethencourt
2dbd065d91 Rename the element field of the DOM Node hierarchy
Renamed htmlelement, and element

Fixes #924
2013-09-19 19:39:38 -04:00
Keegan McAllister
73c1a12f30 bindings: Return errors in Result rather than setting an out parameter
Fixes #909.
2013-09-18 18:07:37 -07:00
Keegan McAllister
68ddc6b4ab Make DOMString an alias for Option<~str>
Fixes #898.
2013-09-18 14:46:42 -07:00
Josh Matthews
21b0fc35b6 Allow image prefetching to occur during parsing when no window or document is present. Fixes #939. 2013-09-13 23:10:31 -07:00
bors-servo
ab743c17fe auto merge of #920 : jdm/servo/setattrabstract, r=metajack
r? @metajack
2013-09-12 15:51:49 -07:00
Josh Matthews
8ae725146c Make Window store an @Page instead of a *Page and remove a bunch of unsafe code. 2013-09-12 14:45:47 -07:00
Josh Matthews
a410651fba Make Element.set_attr require an AbstractNode so we can always downcast. 2013-09-12 14:40:00 -07:00
Josh Matthews
9640324721 Make sandboxed iframes run with different script tasks. 2013-09-11 11:57:40 -07:00
Ms2ger
c9470d5dda Fix unused import warnings. 2013-09-09 13:11:23 +02:00
Josh Matthews
79444596d1 Make querying layout for content boxes an infallible operation. 2013-09-04 11:07:11 -04:00
bors-servo
4cfcad0a0e auto merge of #837 : saneyuki/servo/webidl, r=jdm 2013-09-03 10:46:00 -07:00
Brandon Frohs
02437f7e87 Convert tagName to uppercase ASCII per spec
http://dom.spec.whatwg.org/#dom-element-tagname
2013-09-02 21:21:30 -04:00
Tetsuharu OHZEKI
17e888bfea Generate bindings for HTMLAudioElement, HTMLVideoElement. 2013-09-01 06:51:33 +09:00
Tetsuharu OHZEKI
a76e46416a Generate bindings for HTMLMediaElement. 2013-08-31 20:00:26 +09:00
Tetsuharu OHZEKI
d3108a898d Generate bindings for HTMLTrackElement. 2013-08-31 20:00:26 +09:00
Tetsuharu OHZEKI
9919bae897 Generate bindings for HTMLLabelElement. 2013-08-31 20:00:26 +09:00
Tetsuharu OHZEKI
f7bc8beb18 Generate bindings for HTMLLegendElement. 2013-08-31 20:00:26 +09:00
Tetsuharu OHZEKI
e55b3d6b86 Generate bindings for HTMLPreElement. 2013-08-31 20:00:25 +09:00
Tetsuharu OHZEKI
22e02b573d Generate bindings for HTMLTemplateElement. 2013-08-31 20:00:25 +09:00
Josh Matthews
75f1cbd76f Remove all handwritten bindings code. 2013-08-30 13:13:46 -04:00
Yusuke Suzuki
93fba253a2 Implement IDL based HTMLSmallElement binding 2013-08-31 01:00:05 +09:00
Josh Matthews
1eb5eeb630 Generate bindings for HTMLUnknownElement. 2013-08-28 19:51:07 -04:00
Josh Matthews
65c993e7e6 Generate bindings for HTMLSelectElement. 2013-08-28 19:41:08 -04:00
Josh Matthews
e26a541eb2 Generate bindings for HTMLParamElement. 2013-08-28 17:53:36 -04:00
Josh Matthews
8693459b28 Generate bindings for HTMLOutputElement. 2013-08-28 17:47:29 -04:00
Josh Matthews
cb0adec792 Generate bindings for HTMLOptionElement. 2013-08-28 17:36:37 -04:00
Josh Matthews
4e3b948a37 Generate bindings for HTMLOptGroupElement. 2013-08-28 17:25:37 -04:00
Josh Matthews
a2739fd196 Generate bindings for HTMLObjectElement. 2013-08-28 09:22:08 -04:00
Josh Matthews
4c92810291 Generate bindings for HTMLModElement. 2013-08-28 01:39:38 -04:00
Josh Matthews
0fae7afa54 Generate bindings for HTMLMeterElement. 2013-08-28 01:24:44 -04:00