aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/node.rs
Commit message (Collapse)AuthorAgeFilesLines
* replace .len() == 0 with is_empty()João Oliveira2015-08-141-1/+1
| | | | closes #7198
* Measure heap memory usage for more types. Fixes #6951Bogdan Cuza2015-08-131-3/+3
|
* Auto merge of #6778 - nox:childnodes, r=jdmbors-servo2015-08-101-16/+45
|\ | | | | | | | | | | | | | | | | | | Optimise Node.childNodes <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6778) <!-- Reviewable:end -->
| * Optimise Node.childNodesAnthony Ramine2015-08-091-1/+4
| | | | | | | | | | We use the virtual method children_changed() to propagate changes in the children list to the NodeList tied to Node.childNodes.
| * Cache the number of children of each nodeAnthony Ramine2015-07-311-15/+41
| |
* | Start reporting memory usage for Window and all nodes in all DOM trees for ↵Josh Matthews2015-08-031-1/+8
|/ | | | frame treese in script tasks.
* Auto merge of #6800 - frewsxcv:childnode-before-childnode-after, r=Ms2gerbors-servo2015-07-301-30/+59
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement ChildNode::before & ChildNode::after Continued from #6536 The current implementations of `ChildNode::before` and `ChildNode::after` do not match the WHATWG spec. This commit updates the implementations to match the spec. Our current implementation of `ChildNode::after` passes all the WPT tests. So I made sure to add a regression test that failed with the current implementation. There are a few other unit tests I added to exhaust other corner cases I encountered. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6800) <!-- Reviewable:end -->
| * Implement ChildNode::before & ChildNode::afterCorey Farwell2015-07-291-30/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | Continued from #6536 The current implementations of `ChildNode::before` and `ChildNode::after` do not match the WHATWG spec. This commit updates the implementations to match the spec. Our current implementation of `ChildNode::after` passes all the WPT tests. So I made sure to add a regression test that failed with the current implementation. There are a few other unit tests I added to exhaust other corner cases I encountered.
* | Auto merge of #6783 - dzbarsky:replacechild, r=Ms2gerbors-servo2015-07-301-67/+61
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | Clean up Node::ReplaceChild <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6783) <!-- Reviewable:end -->
| * | Clean up Node::ReplaceChildDavid Zbarsky2015-07-291-67/+61
| | |
* | | Dispose layout data for every node removed from the treeNick Thompson2015-07-281-1/+2
| |/ |/|
* | Auto merge of #6662 - tschneidereit:client-geometry, r=glennw,pcwatsonbors-servo2015-07-271-0/+5
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement Element.client{Top,Left,Width,Height} This isn't done, but contains a working implementation of at least `clientTop`. Feedback would be much appreciated: it's probably far from ideal. Implementing `clientLeft` is straight-forward, I think, but `clientWidth` and `clientHeight` require accessing the `border_box` - and I don't know how that works, yet. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6662) <!-- Reviewable:end -->
| * | Implement client{Top, Left, Height, Width} element propertiesTill Schneidereit2015-07-191-0/+5
| | |
* | | Auto merge of #6760 - dzbarsky:comment-fix, r=jdmbors-servo2015-07-261-3/+2
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | Remove outdated comment about cloning elements The comment points to the "implement element prefix" issue, but we clone the element's prefix when we construct the element right above. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6760) <!-- Reviewable:end -->
| * | Remove outdated comment about cloning elementsDavid Zbarsky2015-07-251-3/+2
| |/
* | Auto merge of #6660 - nox:children-changed, r=jdmbors-servo2015-07-251-154/+168
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce VirtualMethods::children_changed() This virtual method mimics the behaviour of mutation observers and make it more viable than the older child_inserted(), which didn't cover removed nodes and was called as many times as there were inserted nodes. A few other shortcomings where remove_child() was called directly instead of Node::remove() were also fixed while at it. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6660) <!-- Reviewable:end -->
| * | Introduce VirtualMethods::children_changed()Anthony Ramine2015-07-251-154/+168
| | | | | | | | | | | | | | | | | | | | | | | | | | | This virtual method mimics the behaviour of mutation observers and make it more viable than the older child_inserted(), which didn't cover removed nodes and was called as many times as there were inserted nodes. A few other shortcomings where remove_child() was called directly instead of Node::remove() were also fixed while at it.
* | | Auto merge of #6715 - Ms2ger:layoutelement, r=jdmbors-servo2015-07-231-26/+21
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | Implement more methods on LayoutJS. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6715) <!-- Reviewable:end -->
| * | Move the flag getters to LayoutNodeHelpers.Ms2ger2015-07-231-21/+21
| | |
| * | Remove unused RawLayoutNodeHelpers::type_id_for_layout.Ms2ger2015-07-231-5/+0
| | |
* | | Update rust-selectorsSimon Sapin2015-07-231-52/+8
|/ / | | | | | | Update for https://github.com/servo/rust-selectors/pull/37
* | Optimize `Node.normalize()`.Michael Howell2015-07-221-2/+1
| | | | | | | | | | | | Do not copy the discarded node's text data, borrow it. Closes #6658.
* | Auto merge of #6688 - Manishearth:smarter-root-lint, r=jdmbors-servo2015-07-221-14/+15
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | Handle type parameters in unused_must_root fixes #6651 <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6688) <!-- Reviewable:end -->
| * | Address review comments; add docsManish Goregaokar2015-07-221-5/+5
| | |
| * | Fix rooting in scriptManish Goregaokar2015-07-221-14/+15
| |/
* / Upgrade rust-selectors, pass ':empty' testsCorey Farwell2015-07-221-2/+12
|/ | | | https://github.com/servo/rust-selectors/pull/36
* Auto merge of #6568 - dzbarsky:delete_range, r=jdmbors-servo2015-07-161-73/+79
|\ | | | | | | | | | | | | | | | | | | | | Implement Range#insertNode Gecko doesn't really follow the spec but it seems to throw a HierarchyRequest error when parent is null. Any ideas who I should talk to about fixing the spec to account for the null checks? <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6568) <!-- Reviewable:end -->
| * Implement Range#insertNodeDavid Zbarsky2015-07-161-73/+79
| |
* | Directly append children to output node in parse_html_fragmentMichael Wu2015-07-151-9/+3
|/
* Auto merge of #6617 - frewsxcv:fixme-ufcs, r=metajackbors-servo2015-07-141-7/+1
|\ | | | | | | | | | | | | | | | | | | Complete FIXMEs related to UFCS <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6617) <!-- Reviewable:end -->
| * Complete FIXMEs related to UFCSCorey Farwell2015-07-141-7/+1
| |
* | Test element prefix for element equalityDavid Zbarsky2015-07-111-1/+1
|/
* Test element prefix for element equalityDavid Zbarsky2015-07-101-8/+89
|
* Auto merge of #6559 - kball:IS1824-implement-Node.baseURI, r=Ms2gerbors-servo2015-07-061-4/+3
|\ | | | | | | | | | | | | | | | | | | Implement Node.baseURI Addresses Issue #1824. Implements Node.baseURI based on https://www.w3.org/Bugs/Public/show_bug.cgi?id=20976#c32 <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6559) <!-- Reviewable:end -->
| * Implement Node.baseURIKevin Ball2015-07-051-4/+3
| |
* | Auto merge of #6546 - michaelwu:slim-layoutdatawrapper, r=Ms2gerbors-servo2015-07-051-14/+8
|\ \ | |/ |/| | | | | | | | | | | | | | | Remove LayoutChan from LayoutDataWrapper Saves 32 bytes in Node. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6546) <!-- Reviewable:end -->
| * Remove LayoutChan from LayoutDataWrapperMichael Wu2015-07-041-14/+8
| |
* | Remove some redundant let bindingsDavid Zbarsky2015-07-041-7/+2
|/
* Auto merge of #6529 - dwins:master, r=Manishearthbors-servo2015-07-011-3/+2
|\ | | | | | | | | | | | | | | | | | | Refactor #[jstraceable] to #[derive(JSTraceable)] fixes #6524. I had to make an additional change not mentioned in the ticket - adding the `#[feature]` to enable deriving custom traits but I assume that's expected at this time. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6529) <!-- Reviewable:end -->
| * Refactor #[jstraceable] to #[derive(JSTraceable)]David Winslow2015-07-011-3/+2
| | | | | | | | fixes #6524
* | Remove string_cache dependency from util.Matt Brubeck2015-07-011-3/+2
|/ | | | | Move `namespace::from_domstring` from util to script::dom, because it is used only in that crate.
* Fix a bug in Node::pre_insert.Ms2ger2015-06-281-3/+6
| | | | It was accidentally broken in 3ce368fa289bc4c6d09b23357350a37b861013f9.
* Remove unused imports.Ms2ger2015-06-271-1/+0
|
* Update rust-selectorsSimon Sapin2015-06-261-55/+10
|
* Implement the LayoutData getters on LayoutJS<Node> rather than Node itself.Ms2ger2015-06-221-16/+25
|
* Add assertions to LayoutDataRef accessors.Ms2ger2015-06-221-3/+8
|
* Update rust-selectorsSimon Sapin2015-06-201-30/+14
| | | | https://github.com/servo/rust-selectors/pull/30
* Fix some warnings caused by the SM upgradeMichael Wu2015-06-191-1/+1
|
* Upgrade to SM 39Michael Wu2015-06-191-397/+351
|
* Use euclid from crates.ioecoal952015-06-191-1/+1
|