| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now that we have an Element around on cascade, we can stop using the cascade
flags mechanism to pass various element-related state, like "is this element the
root", or "should it use the item-based display fixup".
That fixes handwaviness in the handling of those flags from style reparenting,
and code duplication to handle tricky stuff like :visited.
There are a number of other changes that are worth noticing:
* skip_root_and_item_based_display_fixup is renamed to skip_item_display_fixup:
TElement::is_root() already implies being the document element, which by
definition is not native anonymous and not a pseudo-element.
Thus, you never get fixed-up if your NAC or a pseudo, which is what the code
tried to avoid, so the only fixup with a point is the item one, which is
necessary.
* The pseudo-element probing code was refactored to return early a
Option::<CascadeInputs>::None, which is nicer than what it was doing.
* The visited_links_enabled check has moved to selector-matching time. The rest
of the checks aren't based on whether the element is a link, or are properly
guarded by parent_style.visited_style().is_some() or visited_rules.is_some().
Thus you can transitively infer that no element will end up with a :visited
style, not even from style reparenting.
Anyway, the underlying reason why I want the element in StyleAdjuster is because
we're going to implement an adjustment in there depending on the tag of the
element (converting display: contents to display: none depending on the tag), so
computing that information eagerly, including a hash lookup, wouldn't be nice.
|
| |
|
| |
|
|
|
|
| |
context.
|
| |
|
|
|
|
| |
This prevents confusion and paves the ground for derive(Parse) of them.
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Support matching for ::-moz-tree-* pseudo-elements
This is the Servo side change of [bug 1397644](https://bugzilla.mozilla.org/show_bug.cgi?id=1397644).
<!-- 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/18962)
<!-- Reviewable:end -->
|
| | |
|
| | |
|
|/ |
|
|
|
|
|
|
| |
failures, e.g. in layout/reftests/bugs/392435-1.html. r=backout on a CLOSED TREE
Backs out https://github.com/servo/servo/pull/18809
|
|
|
|
|
| |
It still needs dependencies update to remove all the other bitflags
versions.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Servo currently uses `heapsize`, but Stylo/Gecko use `malloc_size_of`.
`malloc_size_of` is better -- it handles various cases that `heapsize` does not
-- so this patch changes Servo to use `malloc_size_of`.
This patch makes the following changes to the `malloc_size_of` crate.
- Adds `MallocSizeOf` trait implementations for numerous types, some built-in
(e.g. `VecDeque`), some external and Servo-only (e.g. `string_cache`).
- Makes `enclosing_size_of_op` optional, because vanilla jemalloc doesn't
support that operation.
- For `HashSet`/`HashMap`, falls back to a computed estimate when
`enclosing_size_of_op` isn't available.
- Adds an extern "C" `malloc_size_of` function that does the actual heap
measurement; this is based on the same functions from the `heapsize` crate.
This patch makes the following changes elsewhere.
- Converts all the uses of `heapsize` to instead use `malloc_size_of`.
- Disables the "heapsize"/"heap_size" feature for the external crates that
provide it.
- Removes the `HeapSizeOf` implementation from `hashglobe`.
- Adds `ignore` annotations to a few `Rc`/`Arc`, because `malloc_size_of`
doesn't derive those types, unlike `heapsize`.
|
|
|
|
| |
It is likely it's the most useless trait ever existing.
|
| |
|
|
|
|
|
|
| |
Ignoring :
- **generated**.rs
- python/tidy/servo_tidy_tests/rust_tidy.rs
|
|
|
|
|
|
|
|
|
|
| |
The only reason why we had the `existing_style_for_style_damage` bit is to apply
some optimizations that we don't have anymore.
I still want to reintroduce a few of them, at least for the non-eager
pseudo-element case... But I think I won't need this at all.
This allows us to remove a fair amount of Gecko code too.
|
|
|
|
|
|
|
| |
This avoids random HashMaps.
MozReview-Commit-ID: LQeZrLsoOnl
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Unfortunately this means that we lose the NS_STYLE_INHERIT_BIT optimization to
avoid posting changes if we had not requested the struct. In practice, I'm not
sure this optimization matters much, though, and we already compare all the
structs anyway.
We _could_ keep a weak parent pointer from the text style if needed, given we're
going to keep alive the text style at least until the parent style context goes
away, so should be safe, but I don't think the extra churn is worth it, to be
honest. Happy to do so as part of bug 1368290 if you think it's worth it.
Bug: 1385896
Reviewed-by: heycam
MozReview-Commit-ID: ka6tNwf4Ke
|
|
|
|
| |
Servo part of part 5 of the fix for Gecko bug 1324619. r=emilio
|
|
|
|
|
|
| |
no content for ::before and ::after.
Fixes Gecko bug 1376073. r=emilio
|
|
|
|
| |
https://github.com/servo/rust-cssparser/pull/171
|
|
|
|
|
|
| |
::first-letter/::first-line/::placeholder. r=emilio
Part 3 of the fix for Gecko bug 1382786 <https://bugzilla.mozilla.org/show_bug.cgi?id=1382786>.
|
| |
|
| |
|
| |
|
|
|
|
| |
Gecko bug 1324618 part 9 servo bits: https://bugzilla.mozilla.org/show_bug.cgi?id=1324618
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This commit also removes the old restyle_hints module and splits it into
multiple modules under components/style/invalidation/element/.
The basic approach is to walk down the tree using compound selectors as needed,
in order to do as little selector-matching as possible.
Bug: 1368240
MozReview-Commit-ID: 2YO8fKFygZI
|
|
|
|
|
|
|
|
| |
I'll use this information in order to get fewer dependencies out of the
dependency set.
Bug: 1368240
MozReview-Commit-ID: 5HlmKmSNO8p
|
|
|
|
| |
https://bugzilla.mozilla.org/show_bug.cgi?id=1363778
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
We'll need to call it from the style crate in later patches, when matching
:lang() against element snapshots.
|
|
|
|
| |
against snapshots.
|
|
|
|
| |
MozReview-Commit-ID: FZ9YEpHQCBh
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adjust the matching process to look for a "relevant link" while matching. A
"relevant link" is the element being matched if it is a link or the nearest
ancestor link.
Matching for links now depends on the `VisitedHandlingMode`, which determines
whether all links match as if they are unvisited (the default) or if the
relevant link matches as visited (and all others remain unvisited).
If a relevant link is ever found for any selector, track this as part of the
`MatchingContext` object. This is used in the next patch to determine if an
additional match and cascade should be performed to compute the styles when
visited.
MozReview-Commit-ID: 3xUbRo7vpuD
|
|
|
|
| |
pseudo-elements.
|
| |
|
|
|
|
|
| |
* https://bugzilla.mozilla.org/show_bug.cgi?id=1364148
* https://bugzilla.mozilla.org/show_bug.cgi?id=1364162
|
| |
|