| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
| |
Bug: 1477628
Reviewed-by: heycam
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes a couple fuzz bugs and prevents special-casing <svg:use> even more in
bug 1431255.
Unfortunately not as many hacks went away as I'd have hoped, since we still need
to match document rules, see the linked SVGWG issues.
But blocks_ancestor_combinators goes away, which is nice since it's on a very
hot path.
Bug: 1450250
Reviewed-by: heycam
Differential Revision: https://phabricator.services.mozilla.com/D2154
MozReview-Commit-ID: C4mthjoSNFh
|
|
|
|
|
|
|
|
|
|
| |
This was generated with:
./mach cargo fmt --package selectors &&
./mach cargo fmt --package servo_arc &&
./mach cargo fmt --package style
Using rustfmt 0.4.1-nightly (a4462d1 2018-03-26)
|
| |
|
|
|
|
|
|
|
|
|
| |
We could invalidate in a slightly more fine-grained way, but I don't think it's
worth the churn vs. keeping the special-cases minimal.
Bug: 1452640
Reviewed-by: xidorn
MozReview-Commit-ID: 5DkQrgwg9GW
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Kinda tricky because :host only matches rules on the shadow root where the rules
come from. So we need to be careful during invalidation and style sharing.
I didn't use the non_ts_pseudo_class_list bits because as soon as we implement
the :host(..) bits we're going to need to special-case it anyway.
The general schema is the following:
* Rightmost featureless :host selectors are handled inserting them in the
host_rules hashmap. Note that we only insert featureless stuff there. We
could insert all of them and just filter during matching, but that's slightly
annoying.
* The other selectors, like non-featureless :host or what not, are added to the
normal cascade data. This is harmless, since the shadow host rules are never
matched against the host, so we know they'll just never match, and avoids
adding more special-cases.
* Featureless :host selectors to the left of a combinator are handled during
matching, in the special-case of next_element_for_combinator in selectors.
This prevents this from being more invasive, and keeps the usual fast path
slim, but it's a bit hard to match the spec and the implementation.
We could keep a copy of the SelectorIter instead in the matching context to
make the handling of featureless-ness explicit in match_non_ts_pseudo_class,
but we'd still need the special-case anyway, so I'm not fond of it.
* We take advantage of one thing that makes this sound. As you may have
noticed, if you had `root` element which is a ShadowRoot, and you matched
something like `div:host` against it, using a MatchingContext with
current_host == root, we'd incorrectly report a match. But this is impossible
due to the following constraints:
* Shadow root rules aren't matched against the host during styling (except
these featureless selectors).
* DOM APIs' current_host needs to be the _containing_ host, not the element
itself if you're a Shadow host.
Bug: 992245
Reviewed-by: xidorn
MozReview-Commit-ID: KayYNfTXb5h
|
| |
|
|
|
|
|
|
| |
Bug: 1441022
Reviewed-by: xidorn
MozReview-Commit-ID: 2W0BmZ8wWXg
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
It's just a struct aggregating stylesheets + CascadeData, with a quirks_mode
parameter because XBL sucks so bad.
Bug: 1436059
Reviewed-by: xidorn
MozReview-Commit-ID: 7q99tSNXo0K
|
|
|
|
|
|
| |
Bug: 1435214
Reviewed-by: xidorn,hiro
MozReview-Commit-ID: AHwhZynLBv
|
|
|
|
|
|
|
|
| |
document.
Bug: 1435214
Reviewed-by: xidorn
MozReview-Commit-ID: 5ewKiShUHNi
|
|
|
|
| |
This will allow us to discard std hash map as a source of crashes.
|
|
|
|
| |
Bug: 1433589
|
|
|
|
|
| |
This fixes the test from https://github.com/w3c/web-platform-tests/pull/9212 in
Gecko.
|
|
|
|
|
|
|
|
|
| |
Otherwise removal of stylesheets may get out of sync with other DOM changes, and
we may fail to invalidate the style of the affected elements.
Bug: 1432850
Reviewed-by: bz
MozReview-Commit-ID: DrMTgLzQcnk
|
|
|
|
|
|
|
|
|
| |
Instead of on the stack.
This fixes bugs where we're not passing the value around correctly, like from
::-moz-any.
This is a fix for https://bugzilla.mozilla.org/show_bug.cgi?id=1431539.
|
| |
|
|
|
|
|
|
| |
Bug: 1409672
Reviewed-by: xidorn
MozReview-Commit-ID: EoSMrYPS7dl
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a partial revert of
https://github.com/servo/servo/commit/ce1d8cd232dfbc9e0a52f9467ba2bc209087ea63
If you're in a shadow tree, you may not be slotted but you still need to look at
the slotted rules, since a <slot> could be a descendant of yours.
Just use the same invalidation map everywhere, and remove complexity.
This means that we can do some extra work while trying to gather invalidation
if there are slotted rules, but I don't think it's a problem.
The test is ported from https://cs.chromium.org/chromium/src/third_party/WebKit/LayoutTests/fast/css/invalidation/slotted.html?l=1&rcl=58d68fdf783d7edde1c82a642e037464861f2787
Curiously, Blink fails the test as written, presumably because they don't flush
styles from getComputedStyle correctly (in their test they do via
updateStyleAndReturnAffectedElementCount), due to <slot>s not being in the flat
tree in their implementation.
Bug: 1429846
Reviewed-by: heycam
MozReview-Commit-ID: 6b7BQ6bGMgd
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
::slotted is hard.
|
| |
|
|
|
|
|
|
| |
invalidation::element::state_and_attributes.
Since it's what that file is about.
|
|
|
|
| |
MozReview-Commit-ID: GYmsXYvL9vj
|
|
|
|
|
|
| |
Bug: 1424607
Reviewed-by: heycam
MozReview-Commit-ID: 8pIVUx27o7x
|
|
|
|
|
|
|
|
| |
This allows to selector-match ::slotted, though we still don't parse it.
Bug: 1425755
Reviewed-by: heycam
MozReview-Commit-ID: ItELHkf2PMl
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Right now we go through a lot of hoops to see if we ever see a relevant link.
However, that information is not needed: if the element is a link, we'll always
need to compute its visited style because its its own relevant link.
If the element inherits from a link, we need to also compute the visited style
anyway.
So the "has a relevant link been found" is pretty useless when we know what are
we inheriting from.
The branches at the beginning of matches_complex_selector_internal were
affecting performance, and there are no good reasons to keep them.
I've verified that this passes all the visited tests in mozilla central, and
that the test-cases too-flaky to be landed still pass.
|
|
|
|
|
|
|
|
| |
descendant invalidations.
Bug: 1420741
Reviewed-by: heycam
MozReview-Commit-ID: 4Kja20Ep9qD
|
|\
| |
| |
| |
| |
| |
| |
| | |
style: Require an nth-index cache for invalidation.
<!-- 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/19426)
<!-- Reviewable:end -->
|
| | |
|
|/ |
|
|
|
|
| |
Fixes #19195
|
|
|
|
|
| |
MozReview-Commit-ID: 5h5SE3ieC0A
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
|
|
|
|
| |
Backs out https://github.com/servo/servo/pull/19108
|
|
|
|
| |
MozReview-Commit-ID: 5h5SE3ieC0A
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
style: Fix some fishiness in the invalidation code.
See individual commits for details, I think this is not observable.
<!-- 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/19060)
<!-- Reviewable:end -->
|
| |
| |
| |
| |
| | |
Not doing it is buggy. I think the only outcome of it is that we may
over-invalidate, so it's probably not a huge deal, but worth doing it.
|