benshu
0785d91ae4
Completed implementation of devtools' getLayout
.
2016-02-24 13:51:47 -05:00
Matt Brubeck
973918967f
Dirty elements whose selectors are affected by sibling changes
...
This fixes incremental layout of nodes that match pseudo-class selectors such
as :first-child, :nth-child, :last-child, :first-of-type, etc.
* Fixes #8191
* Fixes #9063
* Fixes #9303
* Fixes #9448
This code is based on the following flags from Gecko:
https://hg.mozilla.org/mozilla-central/file/e1cf617a1f28/dom/base/nsINode.h#l134
2016-02-23 17:31:38 -08:00
bors-servo
ee158cc65f
Auto merge of #9603 - Ms2ger:document-bc, r=jdm
...
Store a pointer to the browsing context in the Document.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg " height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9603 )
<!-- Reviewable:end -->
2016-02-19 12:49:35 +05:30
bors-servo
2374e9d30e
Auto merge of #9526 - schuster:node-remove, r=nox
...
My updates so far for issue #8465 . See comments there for more information.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg " height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9526 )
<!-- Reviewable:end -->
2016-02-19 03:14:28 +05:30
Prabhjyot Singh Sodhi
ae80b9bcf0
fix Node-isEqualNode.html test failure
2016-02-16 00:24:35 +05:30
Jonathan Schuster
4bb5cd1285
Move comment about removing steps
2016-02-13 14:22:10 -05:00
Jonathan Schuster
983e76af87
Update node::remove comments to reflect standard
2016-02-13 13:40:49 -05:00
Anthony Ramine
55dcee94be
Bump heapsize to 0.3
2016-02-13 11:13:19 +01:00
Ms2ger
152cec69eb
Store a pointer to the browsing context in the Document.
2016-02-11 13:08:11 +01:00
Alexander Lopatin
2be49404be
Fix #9508 : Beautify our union enums constructors
2016-02-07 02:55:21 +03:00
Anthony Ramine
cb5cd8d881
Say farewell to in-tree HeapSizeOf
2016-02-04 22:03:32 +01:00
Anthony Ramine
9932a5cf82
Abstract out Node::unique_id in its own structure
...
An UnsafeCell is use to lazily create the Uuid.
2016-02-04 14:22:53 +01:00
Emilio Cobos Álvarez
a1c830f1c1
Update rust-selectors
...
This commits updates rust-selectors to use the generic parser, and as
such it moves the element state into the style crate.
2016-02-03 02:11:31 +01:00
Simon Sapin
9abbd1b5d1
Sequentialize assign_block_size for flows that can be fragmented.
...
Fragmentation will be intertwined with block size calculation.
2016-01-28 09:42:17 +01:00
Simon Sapin
da2b4ab381
Disable incremental reflow for multicol and their descendants.
...
Fragmentation with dynamic updates is hard.
2016-01-27 17:33:12 +01:00
rohan.prinja
1f02c4ebbb
task -> thread
2016-01-10 17:58:13 +09:00
Guillaume Gomez
99ac1a81cc
Generate PartialEq automatically
2016-01-03 18:07:09 +01:00
Johannes Linke
6b215f38ee
Fix a bunch of clippy lints
2016-01-02 23:27:15 +01:00
Bobby Holley
47059d2d26
Separate style+layout and layout-specific wrapper functionality.
...
This patch does a number of things, unfortunately all at once:
* Hoists a large subset of the layout wrapper functionality into the style system.
* Merges TElementAttributes into the newly-created TElement.
* Reorganizes LayoutData by style vs layout, and removes LayoutDataShared.
* Simplifies the API for borrowing style/layout data.
There's still more to do to make the style system usable standalone, but
this is a good start.
2015-12-29 11:50:03 -08:00
bors-servo
89ab368258
Auto merge of #8506 - nox:finish-ranges, r=dzbarsky
...
Properly propagate changes when range or trees are mutated
Does the same thing as #6817 , but storing Range instances directly in their start and end containers.
Cc @dzbarsky
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8506 )
<!-- Reviewable:end -->
2015-12-26 04:08:15 +05:30
Anthony Ramine
3c76835615
Properly propagate changes when range or trees are mutated
2015-12-25 23:35:57 +01:00
bors-servo
8c87477138
Auto merge of #9026 - Manishearth:attack-of-the-clones, r=Ms2ger
...
Remove clone in collect_text_contents
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9026 )
<!-- Reviewable:end -->
2015-12-20 00:14:02 +05:30
Manish Goregaokar
ef5de267d9
Remove clone in collect_text_contents
2015-12-19 01:06:16 +05:30
Anthony Ramine
748dfdf575
Fix Node::replace_with
2015-12-14 00:13:56 +01:00
Anthony Ramine
1dd7c8cf01
Introduce CharacterData::clone_with_data()
2015-12-13 21:14:34 +01:00
Anthony Ramine
8f01790f06
Introduce UnbindContext
...
This holds the context that describes the original node that was removed from a tree
when unbinding from a tree.
2015-12-13 21:14:31 +01:00
Anthony Ramine
b63ca94c7f
Fix Node::ReplaceChild
2015-12-13 21:12:19 +01:00
Jason Williams
1a8db9a07a
now using external ref_slice instead of the std version
2015-12-03 07:32:07 +00:00
bors-servo
c0be03f2af
Auto merge of #8701 - nerith:attribute, r=jdm
...
Remove `#[allow(raw_pointer_derive)]` attributes
The attributes are unused.
Fixes #8699 .
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8701 )
<!-- Reviewable:end -->
2015-11-28 06:07:46 +05:30
Brandon Fairchild
341e66f66d
Remove #[allow(raw_pointer_derive)]
attributes
...
The attributes are unused.
Fixes #8699 .
2015-11-27 14:32:57 -05:00
Guillaume Gomez
adf8b359bb
Add XMLDocument object
2015-11-27 14:55:41 +01:00
Alan Jeffrey
3dec6edd10
Update string_cache to 0.2.
...
Updated string_cache, html5ever, xml5ever and selectors in Cargo.toml files and Cargo.lock.
Removed references to string_cache_plugin.
Import atom! and ns! from string_cache.
Replaced ns!("") by ns!().
Replaced ns!(XML) and co by ns!(xml) and co.
Replaced atom!(foo) by atom!("foo").
Replaced Atom::from_slice by Atom::from.
Replaced atom.as_slice() by &*atom.
2015-11-25 10:13:21 -06:00
Nick Fitzgerald
bd857cb1cb
Remove two unused imports from components/script/dom/node.rs
...
Fixes these two compiler warnings:
```
Compiling servo v0.0.1 (file:///Users/fitzgen/src/servo/components/servo)
/Users/fitzgen/src/servo/components/script/dom/node.rs:26:65: 26:78 warning: unused import, #[warn(unused_imports)] on by default
/Users/fitzgen/src/servo/components/script/dom/node.rs:26 use dom::bindings::inheritance::{Castable, CharacterDataTypeId, ElementTypeId};
^~~~~~~~~~~~~
/Users/fitzgen/src/servo/components/script/dom/node.rs:27:53: 27:70 warning: unused import, #[warn(unused_imports)] on by default
/Users/fitzgen/src/servo/components/script/dom/node.rs:27 use dom::bindings::inheritance::{EventTargetTypeId, HTMLElementTypeId, NodeTypeId};
^~~~~~~~~~~~~~~~~
```
2015-11-21 21:45:55 -08:00
Rizky Luthfianto
d3c852ed85
Remove 'Node::is_anchor_element'
2015-11-21 11:44:10 +07:00
Aleksandr Likhanov
4bf21ab15e
reduce node.unique_id size
...
fix sizeof unittest
update Cargo.lock
2015-11-19 00:48:20 +05:00
Brandon Fairchild
6a28d62b15
Make Node::is_parent_of more idiomatic
2015-11-17 16:58:37 -05:00
Alan Jeffrey
84bde75b42
Replaced DOMString constructor by conversion functions.
...
Replaced DOMString(...) by DOMString::from(...).
Replaced ....0 by String::from(...).
Removed any uses of .to_owner() in DOMString::from("...").
2015-11-12 17:52:59 -06:00
Alan Jeffrey
5101506089
Replaced DOMString by String in devtools.
2015-11-12 17:52:58 -06:00
bors-servo
1720595a85
Auto merge of #8479 - frewsxcv:domstring-default, r=Ms2ger
...
Implement Default trait for DOMString
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8479 )
<!-- Reviewable:end -->
2015-11-13 04:51:32 +05:30
Corey Farwell
00fa3b2f85
Implement Default trait for DOMString
2015-11-11 22:12:56 -05:00
Corey Farwell
1789405883
Remove unnecessary 'node changed' notification
...
This same notification already happens in `CharacterData::SetData`
2015-11-11 17:53:38 -05:00
bors-servo
01ff78b438
Auto merge of #8466 - frewsxcv:node-value, r=nox
...
Simplify script::dom::node NodeValue implementations
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8466 )
<!-- Reviewable:end -->
2015-11-11 21:43:21 +05:30
Corey Farwell
261ce49423
Simplify script::dom::node NodeValue implementations
2015-11-11 08:53:53 -05:00
Anthony Ramine
b290a3161d
Clean up the conversion routines
...
Functions returning `Root<T>` are prefixed by "root_" and the ones returning
`*const T` by "native_".
Functions taking `*mut JSObject` are now suffixed by "_from_object" and the ones
taking `&T` by "_from_reflector".
2015-11-11 14:19:30 +01:00
Bobby Holley
7fa7936657
Implement attribute restyle hints.
...
Fixes #6942 .
2015-11-10 11:57:24 -08:00
Alan Jeffrey
64a50bcf56
Added versioning to DOM nodes.
...
There is now an inclusive_descendants_version field of each node, which
increases each time the node, or any of its descendants, is dirtied.
This can be used for cache invalidation, by caching a version number
and comparting the current version number against the cached version number.
2015-11-06 17:23:16 -06:00
bors-servo
c54558d5ef
Auto merge of #8315 - asajeffrey:remove_child_dirty_parent, r=pcwalton
...
Dirty parent when removng a child node.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8315 )
<!-- Reviewable:end -->
2015-11-07 02:04:28 +05:30
David Zbarsky
dfc90db1d7
Cleanup some unneeded let bindings
2015-11-06 00:22:31 -08:00
Alan Jeffrey
99de8521e6
Dirty parent when removng a child node.
2015-11-04 10:14:42 -06:00
Ms2ger
6b75078503
Make DOMString a newtype around String, rather than a typedef.
...
This should make it somewhat easier to experiment with alternative
representations in the future. To reduce churn, this commit leaves the String
field public, though.
Also, this will allow us to use the default String type to represent the IDL
USVString type, which explicitly forbids unpaired surrogates, ans as such is
a better match to the Rust String type.
2015-11-04 12:09:11 +01:00