Commit graph

22 commits

Author SHA1 Message Date
Simon Sapin
64885c4213 Update to rustc 1.17.0-nightly (413a975e3 2017-02-23)
Fix #15704
2017-02-24 01:49:29 +01:00
Bobby Holley
9e860df9df Bug 1336646 - Apply selector flags during traversal. r=emilio 2017-02-08 19:21:05 -08:00
Bobby Holley
940cda1d15 Remove generation, remove filter pop, and add size tests. 2016-12-22 11:09:55 -08:00
Ms2ger
86d59212fe Introduce a script::test module to expose the APIs needed for unit tests. 2016-12-22 15:58:53 +01:00
Simon Sapin
acc38aa8c2 Use Arc<PropertyDeclarationBlock> everwhere it’s appropriate. 2016-08-31 02:34:07 +02:00
Anthony Ramine
c66380d83c Update Rust to 1.13.0-nightly (198713106 2016-08-26) 2016-08-28 13:45:03 +02:00
Mitchell Hentges
1ca4a3e32f Compute tag_name a maximum of once per document owner 2016-08-03 20:05:22 -07:00
Ms2ger
0c506cf1df Remove the wrapper::ServoThreadSafeLayoutNode re-export. 2016-06-20 19:08:09 +02:00
Matt Brubeck
33b9aa49db Update path in script_tests::size_of error messages 2016-03-29 08:41:12 -07: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
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
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
Anthony Ramine
3c76835615 Properly propagate changes when range or trees are mutated 2015-12-25 23:35:57 +01:00
Aleksandr Likhanov
4bf21ab15e reduce node.unique_id size
fix sizeof unittest
update Cargo.lock
2015-11-19 00:48:20 +05: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
Bobby Holley
69255ed169 Bump the expected sizes for Element.
After rebasing, this suddenly became a problem again, even though there's no actual size increase here
(we're shrinking NodeFlags by 1 byte, and adding 1 byte of EventState). Moving the NodeFlags to the end
of Node and the EventState bits to the beginning of Element doesn't seem to helper either.

This is probably a padding issue that's worth investigating at some point, but given the level
of churn in this code it doesn't seem worth it to fuss to much over this right now.
2015-10-16 17:56:33 -07:00
bors-servo
d1269294e6 Auto merge of #7611 - nox:cache-element-id, r=frewsxcv
Cache the `id` attribute on Element

Thanks to @asabil for the original work, I only rebased it.

Fixes #6359 and #7040.


<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7611)
<!-- Reviewable:end -->
2015-09-20 09:23:20 -06:00
Brandon Fairchild
de3547e401 Fix reported test-tidy errors for unmerged import blocks
This merges import blocks that were reported by tidy as unmerged.
2015-09-19 12:50:14 -04:00
Ali Sabil
ea655ada10 Cache the id attribute on Element 2015-09-13 23:55:40 +02:00
Michael Wu
941f7dc04b Move EventTargetTypeId/NodeTypeId to DOMClass 2015-09-12 01:09:46 +02:00
Michael Wu
1a014beb08 Remove LayoutChan from LayoutDataWrapper 2015-07-04 03:54:40 -04:00
Simon Sapin
dc431c9bdb Move script crate unit tests into the unit_tests crate. 2015-04-08 01:07:53 +02:00
Renamed from components/script/tests.rs (Browse further)