Commit graph

366 commits

Author SHA1 Message Date
bors-servo
5a66b59f9b Auto merge of #6760 - dzbarsky:comment-fix, r=jdm
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 -->
2015-07-26 08:01:56 -06:00
David Zbarsky
3801cfdd35 Remove outdated comment about cloning elements 2015-07-25 13:40:29 -04:00
bors-servo
705c95dedb Auto merge of #6660 - nox:children-changed, r=jdm
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 -->
2015-07-25 11:39:20 -06:00
Anthony Ramine
7b40cc9fd7 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.
2015-07-25 19:09:40 +02:00
bors-servo
f44d75e5b2 Auto merge of #6715 - Ms2ger:layoutelement, r=jdm
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 -->
2015-07-23 12:40:52 -06:00
Ms2ger
849eb7837a Move the flag getters to LayoutNodeHelpers. 2015-07-23 20:13:06 +02:00
Ms2ger
32ee62b4c8 Remove unused RawLayoutNodeHelpers::type_id_for_layout. 2015-07-23 19:54:12 +02:00
Simon Sapin
055a1c5cee Update rust-selectors
Update for https://github.com/servo/rust-selectors/pull/37
2015-07-23 18:53:57 +02:00
Michael Howell
402a2a8717 Optimize Node.normalize().
Do not copy the discarded node's text data, borrow it.

Closes #6658.
2015-07-22 10:53:50 -07:00
bors-servo
8a6681ba70 Auto merge of #6688 - Manishearth:smarter-root-lint, r=jdm
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 -->
2015-07-22 07:05:31 -06:00
Manish Goregaokar
a9f651cfa1 Address review comments; add docs 2015-07-22 18:34:54 +05:30
Corey Farwell
b1b03a32db Upgrade rust-selectors, pass ':empty' tests
https://github.com/servo/rust-selectors/pull/36
2015-07-22 18:27:33 +07:00
Manish Goregaokar
511e3337fb Fix rooting in script 2015-07-22 00:00:15 +05:30
Till Schneidereit
162ecd0aac Implement client{Top, Left, Height, Width} element properties 2015-07-19 15:04:50 +02:00
bors-servo
acf47a02cf Auto merge of #6568 - dzbarsky:delete_range, r=jdm
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 -->
2015-07-16 10:56:17 -06:00
David Zbarsky
c2664e52dd Implement Range#insertNode 2015-07-16 17:43:46 -04:00
Michael Wu
2752d3398e Directly append children to output node in parse_html_fragment 2015-07-15 17:09:26 -04:00
bors-servo
6a728712f9 Auto merge of #6617 - frewsxcv:fixme-ufcs, r=metajack
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 -->
2015-07-14 01:30:12 -06:00
Corey Farwell
78d2fe6e9b Complete FIXMEs related to UFCS 2015-07-14 09:24:53 +09:00
David Zbarsky
0fa8e51432 Test element prefix for element equality 2015-07-11 02:50:39 -04:00
David Zbarsky
326b2a7161 Test element prefix for element equality 2015-07-10 14:41:37 -04:00
bors-servo
1e16047846 Auto merge of #6559 - kball:IS1824-implement-Node.baseURI, r=Ms2ger
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 -->
2015-07-06 11:04:45 -06:00
bors-servo
cc73aad447 Auto merge of #6546 - michaelwu:slim-layoutdatawrapper, r=Ms2ger
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 -->
2015-07-05 21:39:12 -06:00
Kevin Ball
dbbab3b113 Implement Node.baseURI 2015-07-05 15:29:04 -07:00
David Zbarsky
861ddedaef Remove some redundant let bindings 2015-07-04 13:12:49 -04:00
Michael Wu
1a014beb08 Remove LayoutChan from LayoutDataWrapper 2015-07-04 03:54:40 -04:00
bors-servo
bbb39082e0 Auto merge of #6529 - dwins:master, r=Manishearth
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 -->
2015-07-01 18:27:40 -06:00
David Winslow
4cf46bff2d Refactor #[jstraceable] to #[derive(JSTraceable)]
fixes #6524
2015-07-01 18:27:06 -04:00
Matt Brubeck
13072c7b0c Remove string_cache dependency from util.
Move `namespace::from_domstring` from util to script::dom, because it is used
only in that crate.
2015-07-01 10:04:53 -07:00
Ms2ger
0b680dc9bd Fix a bug in Node::pre_insert.
It was accidentally broken in 3ce368fa28.
2015-06-28 15:59:01 +02:00
Ms2ger
108c9b161c Remove unused imports. 2015-06-27 19:37:12 +02:00
Simon Sapin
9e1a674b16 Update rust-selectors 2015-06-26 12:35:08 -07:00
Ms2ger
eb2c508df0 Implement the LayoutData getters on LayoutJS<Node> rather than Node itself. 2015-06-22 10:47:21 +02:00
Ms2ger
a217ffb00a Add assertions to LayoutDataRef accessors. 2015-06-22 10:47:19 +02:00
Simon Sapin
fc25397c91 Update rust-selectors
https://github.com/servo/rust-selectors/pull/30
2015-06-20 07:05:43 +02:00
Michael Wu
b7301ca06c Fix some warnings caused by the SM upgrade 2015-06-19 22:07:08 -04:00
Michael Wu
675267b782 Upgrade to SM 39 2015-06-19 18:42:48 -04:00
ecoal95
8cbfb3482c Use euclid from crates.io 2015-06-19 00:04:24 +02:00
Ms2ger
5149f0e953 Remove null_str_as_empty and null_str_as_empty_ref functions.
With just one caller between the two functions, there doesn't seem to be
much point in having the abstraction.
2015-06-10 13:36:51 +02:00
Ms2ger
749598f5a0 Optimize lookupPrefix. 2015-06-10 10:33:40 +02:00
bors-servo
bf4fc6f388 Auto merge of #5972 - pgonda:remove-children-from-doc, r=jdm
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5972)
<!-- Reviewable:end -->
2015-05-29 12:03:28 -05:00
Jinwoo Song
db25be7bf6 Update NodeIterator code to apply review comments. 2015-05-28 18:37:27 +09:00
Peter
7239d67353 fixes #5963 2015-05-26 10:01:03 -04:00
bors-servo
7d0409b842 Auto merge of #6140 - nox:cleanup-rootedvec, r=Manishearth
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6140)
<!-- Reviewable:end -->
2015-05-26 08:36:29 -05:00
Anthony Ramine
81cacdf820 Remove use of RootedVec in NodeList 2015-05-26 15:35:16 +02:00
Corey Farwell
8e3f4bba85 Reduce max line length from 150 to 120 characters
Part of https://github.com/servo/servo/issues/6041
2015-05-24 00:01:49 -04:00
bors-servo
fada39164c Auto merge of #5858 - pgonda:tabindex-focus-flag, r=jdm
Added support for the tabindex field, also added its correct defaults (-2 TODOs for things not supported in Servo yet).  Also added tabindex logic into Element::is_focusable_area.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5858)
<!-- Reviewable:end -->
2015-05-20 14:34:31 -05:00
Peter
1c96eed544 fixes #5603, adds support for tabindex 2015-05-20 10:34:16 -04:00
bors-servo
6481058309 Auto merge of #6139 - michaelwu:rustup-fixes, r=SimonSapin
Mutable transmutes and wrong transmutes fixed.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6139)
<!-- Reviewable:end -->
2015-05-20 01:55:43 -05:00
Michael Wu
7772984e0b Fix borrow_unchecked in LayoutDataRef 2015-05-19 15:27:40 -04:00