| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
That way we can use borrow_mut_for_layout and borrow_mut.
|
|
|
|
| |
It now stores a NonNull<dyn Any>.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This includes a `size_of` regression for a few DOM types,
due to https://github.com/rust-lang/rust/pull/58623 which replaces the
implementation of `HashMap` in the standard library to Hashbrown.
Although `size_of<HashMap>` grows, it’s not obvious how total memory usage
is going to be impacted: Hashbrown only has one `u8` instead of one `usize`
of overhead per hash table bucket for storing (part of) a hash,
and so might allocate less memory itself.
Hashbrown also typically has better run time performance:
https://github.com/rust-lang/hashbrown#performance
Still, I’ve filed https://github.com/rust-lang/hashbrown/issues/69
about potentially reducing the `size_of<HashMap>` regression.
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Implement custom element reactions
<!-- Please describe your changes on the following line: -->
Initial work for implementing custom element reactions: https://html.spec.whatwg.org/multipage/custom-elements.html#custom-element-reactions
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #17433 (github issue number if applicable).
<!-- Either: -->
- [X] There are tests for these changes OR
- [ ] These changes do not require tests because _____
<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17614)
<!-- Reviewable:end -->
|
| | |
|
|/
|
|
|
|
|
|
| |
This allows us to have ensure_data() and clear_data() functions on the TElement
trait, instead of hacking around it adding methods in random traits.
This also allows us to do some further cleanup, which I'd rather do in a
followup.
|
|
|
|
|
| |
Implements step 6.1.10 of
https://dom.spec.whatwg.org/#concept-create-element
|
| |
|
|
|
|
| |
MozReview-Commit-ID: AAmeyjfyXeU
|
| |
|
|\ |
|
| |
| |
| |
| |
| | |
This will go back down soonish when NonZero stablizes and we can use it in
StyleArc, which I expect will be long before the memory overhead here matters.
|
|/ |
|
| |
|
|
|
|
|
| |
This fixes the DOM node size regression introduced by a previous Rust update:
https://github.com/servo/servo/issues/15704
|
|
|
|
| |
Fix #15704
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
An UnsafeCell is use to lazily create the Uuid.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
fix sizeof unittest
update Cargo.lock
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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 -->
|
| | |
|
|/
|
|
| |
This merges import blocks that were reported by tidy as unmerged.
|
| |
|
| |
|
|
|