| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
A couple of changes here:
* Remove the option to unset with the dirty bit setters.
* Add an explicit API for setting text node style.
* Hoist has_changed handling into the restyle damage setter and text node style setter.
* Make set_style take a non-Option.
|
|\
| |
| |
| |
| |
| |
| |
| | |
Use mem::replace in take_pseudo_styles.
<!-- 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/13691)
<!-- Reviewable:end -->
|
| | |
|
|/
|
|
| |
thread
|
|
|
|
|
| |
The new restyle architecture doesn't store these things in consistent
places, so we need a more abstract API.
|
|
|
|
|
|
|
|
|
|
|
| |
We don't need this for Gecko, and it's hard to implement in that case because
there's nowhere obvious to put it (we don't plan to create TSDs for non-dirty
nodes, and non-dirty nodes can have dirty children which require the
children_to_process atomic). There are various solutions here, but punting is
the easiest.
We'll need to rethink this if/when we need to do a bottom-up traversal for
Gecko.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
of RefCell as a container.
This allows us to eliminate the unsafe borrows. \o/
MozReview-Commit-ID: 29hpGaWUFQz
|
| |
|
|
|
|
| |
methods in style and layout.
|
| |
|
| |
|
|
|
|
| |
Make it more different from PropertyDeclarationBlock
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add lots of Arc’s in style, and prepare for using DOMRefCell
<!-- Please describe your changes on the following line: -->
`DOMRefCell` usage is not there year because of thread-safety questions, but I have this much already that I’d like to land before it bitrots.
r? @emilio
---
<!-- 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
- [ ] These changes fix #__ (github issue number if applicable).
<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require new tests because refactor
<!-- 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/13134)
<!-- Reviewable:end -->
|
| | |
|
|/
|
|
|
|
|
|
|
|
| |
a script query.
This will, rather unfortunately, mean that we might repaint two times if we've
deferred a paint, then get an out-of-band reflow. Still seemed better than not
suppressing paints at all.
Fixes #13131
|
|
|
|
|
| |
The semantics of this method with respect to anonymous children are unclear.
Thankfully it's unused, so we can remove it.
|
|
|
|
|
| |
This will allow us to specialize ChildrenIterator in the Gecko case to do
something more interesting in some cases.
|
|
|
|
| |
Nobody else uses it, and I want to make breaking changes to it.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The style candidate cache had regressed a few times (see #12534), and my
intuition is that being able to disable all style sharing with a single rule in
the page is really unfortunate.
This commit redesigns the style sharing cache in order to be a optimistic cache,
but then reject candidates if they match different sibling-affecting selectors
in the page, for example.
So far the numbers have improved, but not so much as I'd wanted (~10%/20% of
non-incremental restyling time in general). The current implementation is really
dumb though (we recompute and re-match a lot of stuff), so we should be able to
optimise it quite a bit.
I have different ideas for improving it (that may or may not work), apart of the
low-hanging fruit like don't re-matching candidates all the time but I have to
measure the real impact.
Also, I need to verify it against try.
|
|
|
|
| |
I used this to trace #11818 to a style bug, rather than a layout bug.
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
stylo: Allow computing change hints during the traversal.
<!-- Please describe your changes on the following line: -->
---
<!-- 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
<!-- Either: -->
- [x] These changes do not require tests because geckolib :-(
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
r? @bholley
cc @heycam
<!-- 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/12645)
<!-- Reviewable:end -->
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In the Gecko case, this style source would be the style context. In the servo
case, it will be always the computed values.
We could optimise this further in the case of stylo (from three FFI calls to
one) if we use an API of the form CalcAndStore(node, new_cv). But that would
imply borrowing the data twice from Servo (we also have borrow_data_unchecked
fwiw, but...).
|
|/ |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
snapshots, and use it for Gecko.
This is a rewrite for how style interfaces with its consumers in order to allow
different representations for an element snapshot.
This also changes the requirements of an element snapshot, requiring them to
only implement MatchAttr, instead of MatchAttrGeneric. This is important for
stylo since implementing MatchAttrGeneric is way more difficult for us given the
atom limitations. This also allows for more performant implementations in the
Gecko side of things.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Same reasons as the previous patch.
|
|
|
|
|
| |
If this is all the information the caller needs, we can get it from gecko without
worrying about atomization and string conversions.
|
|
|
|
| |
This should just be a helper.
|
| |
|
| |
|
|
|
|
|
| |
This allows removing `#![feature(as_unsafe_cell)]` in geckolib
and make progress towards #11815.
|
| |
|
| |
|
|
|