Bruno de Oliveira Abinader
56572a2814
Implement document.compatMode
...
Spec:
http://dom.spec.whatwg.org/#dom-document-compatmode
This is a sub-task for #1428 .
2014-01-30 19:12:19 -04:00
Bruno de Oliveira Abinader
43416ef91f
Implement document.URL & document.documentURI
...
Specs:
http://dom.spec.whatwg.org/#dom-document-url
http://dom.spec.whatwg.org/#dom-document-documenturi
This is a sub-task for #1428 .
2014-01-30 10:41:24 -04: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
bors-servo
d11e431887
auto merge of #1533 : metajack/servo/unsafe-get-attr, r=jdm
...
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 16:28:20 -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
Bruno de Oliveira Abinader
1067da7df8
Basic support for Document::contentType
...
Spec:
http://dom.spec.whatwg.org/#dom-document-contenttype
This is a subtask for #1428 , #1510 and #1526 .
2014-01-21 12:48:09 -04:00
Bruno de Oliveira Abinader
cdf29d4394
Remove Document's unused 'title'
...
There is no current use for this variable.
This is a subtask for #1428 .
2014-01-17 10:00:50 -04:00
Bruno de Oliveira Abinader
60dd40f412
Add DOMImplementation skeleton
...
Creates a DOMImplementation struct corresponding to DOMImplementation
WebIDL. Also implements a getter for Document::implementation.
Closes #1486 .
2014-01-14 13:20:36 -04:00
Bruno de Oliveira Abinader
742ad9cd24
Implement Document::doctype
...
Closes #1482 .
2014-01-13 15:45:34 -04:00
Tetsuharu OHZEKI
fd0dadbddf
Enable only remove operation for Document::update_idmap().
2014-01-13 23:10:21 +09:00
bors-servo
943ab4a4f0
auto merge of #1473 : metajack/servo/rustup-20131219, r=jdm
2014-01-12 19:16:21 -08:00
Jack Moffitt
a7ef1cd35e
Upgrade to latest Rust.
2014-01-12 19:45:45 -07:00
Bruno de Oliveira Abinader
b5eba001ef
Fix to avoid attribute name clash between Document/HTMLDocument
...
Use children() instead of traverse_preorder(), and avoid having
GetHead() in both Document and HTMLDocument.
Closes #1465 .
2014-01-08 16:44:47 -04:00
Bruno de Oliveira Abinader
17b35d52ff
Implement Document::head()
...
Implementation details according to the specification below:
http://www.whatwg.org/specs/web-apps/current-work/#dom-document-head
This patch is for:
https://github.com/mozilla/servo/issues/1465
2014-01-07 15:51:45 -04:00
Shamir Khodzha
8bb1724c1e
implemented iterator for child elements
2014-01-03 21:52:22 +04:00
Ms2ger
95913d1fed
Pass a Namespace to Element::get_attr.
2013-12-23 13:03:52 +01:00
Bruno de Oliveira Abinader
ce434dfb3e
Implement Document's 'body' attribute
...
Implement Document's 'body' attribute (getter and setter). Proper
implementation of setter requires Node::ReplaceChild(), which is
currently a stub and will be done on a later step.
This patch is for:
https://github.com/mozilla/servo/issues/1428
2013-12-20 10:58:03 -04: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
Simon Sapin
b290823f4d
Fix #1264 : support namespaced attribute selectors.
2013-12-10 17:53:12 +00:00
Ms2ger
29a7405b4e
Report exceptions to JS when the DOM implementation fails.
...
As a bonus, adds some debugging statements.
2013-12-05 16:14:02 +01: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
4e4eb10ffc
Use 'DOMString' to define the type insteand of '~str'.
...
At now, 'DOMString' is equal to '~str'.
155befe10d/src/components/script/dom/bindings/utils.rs (L119)
2013-11-23 22:24:52 +09:00
Tetsuharu OHZEKI
aa72c413ed
Enable to update id attribute for Document.getElementById(). ( #740 )
2013-11-23 11:53:45 +09:00
Ms2ger
dc6dbc63af
Make the HTML parser parse into the document rather than an element.
...
This removes the duplicate html element.
2013-11-17 13:58:24 +01:00
Ms2ger
d4a48995a2
Remove type_id arguments from Event::new and UIEvent::new.
2013-11-14 21:10:23 +01:00
Tetsuharu OHZEKI
f5ef4365f4
Stop passing DOMStrings via borrowed pointer. ( #1201 )
2013-11-14 20:35:36 +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
Ms2ger
80a6103f7d
Remove Reflectable::GetParentObject.
2013-11-06 21:56:47 +01:00
Ms2ger
ccd9306681
Remove DerivedWrapper.
2013-11-06 18:16:31 +01:00
Ms2ger
53731b62ae
Remove Reflectable::wrap_object_shared.
2013-11-06 16:40:16 +01:00
Ms2ger
8a7448bc67
Rewrite Document creation and reflection.
2013-11-05 20:45:50 +01:00
Josh Matthews
bb97fd13f3
Add Event and EventTarget hierarchy via gross AbstractFoo mechanism.
2013-11-05 12:58:28 -05:00
Josh Matthews
7ecf5abbbd
Generate code for handling callbacks. Implement add/removeEventListener and hacky dispatchEvent proof-of-concept.
2013-11-05 12:58:28 -05:00
Ms2ger
78e51c8309
Rewrite DocumentFragment::new to current standards.
2013-11-02 22:23:44 +01:00
Ms2ger
a431202989
Rewrite Comment::new to current standards.
2013-11-02 22:10:07 +01:00
Ms2ger
da37fde44f
Rewrite Text::new to current standards.
2013-11-02 21:55:36 +01:00
Ms2ger
7700a892fc
Cleanup build_element_from_tag's signature.
2013-11-02 21:13:37 +01:00
Ms2ger
e918d4daf0
Use HTMLTitleElement::new in Document::SetTitle.
2013-11-02 20:36:50 +01:00
Josh Matthews
99a36cbeb6
Make Document a Node.
2013-10-31 13:34:44 -04:00
Ms2ger
2ca1eede9a
Implement insertBefore and reimplement appendChild.
2013-10-29 21:48:28 +01:00
Patrick Walton
baba35adc9
Revert "Make Document a Node." for breaking Acid1
...
This reverts commit 4e47d59165
.
Conflicts:
src/components/script/dom/domparser.rs
2013-10-24 15:08:09 -07:00
bors-servo
13644ccab1
auto merge of #1079 : jdm/servo/docnode, r=jdm,metajack
...
The bit I don't like about these changes is that I ended up hiding the document node from the CSS selecting/matching code, so it continues thinking of the document's first child as the root. When I tried to send the full tree including the document node to layout, the layout code refused to create any child flows. When I sent the document's first child without hiding the document, it saw inherited values for properties like font-family, and later tried to treat the document node as an Element when searching for named nodes.
2013-10-24 09:15:55 -07:00
Josh Matthews
4e47d59165
Make Document a Node.
2013-10-24 18:07:46 +02:00
Ms2ger
5d1eea5f03
Remove unused get_scope_and_cx functions.
2013-10-24 16:37:56 +02:00