mirror of
https://github.com/servo/servo.git
synced 2025-08-13 01:15:34 +01:00
Auto merge of #17055 - bzbarsky:sharing-across-ids, r=emilio
Allow style sharing for elements with ids as long as the ID is not being used for styling <!-- 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 - [X] These changes fix part of the problem we're seeing in https://bugzilla.mozilla.org/show_bug.cgi?id=1367862 <!-- Either: --> - [ ] There are tests for these changes OR - [X] These changes do not require tests because the only impact is on performance and memory. <!-- 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/17055) <!-- Reviewable:end -->
This commit is contained in:
commit
429db6a3c6
9 changed files with 240 additions and 44 deletions
|
@ -77,11 +77,19 @@ fn test_revalidation_selectors() {
|
|||
let test = parse_selectors(&[
|
||||
// Not revalidation selectors.
|
||||
"div",
|
||||
"#bar",
|
||||
"div:not(.foo)",
|
||||
"div span",
|
||||
"div > span",
|
||||
|
||||
// ID selectors.
|
||||
"#foo1", // FIXME(bz) This one should not be a revalidation
|
||||
// selector once we fix
|
||||
// https://bugzilla.mozilla.org/show_bug.cgi?id=1369611
|
||||
"#foo2::before",
|
||||
"#foo3 > span",
|
||||
"#foo1 > span", // FIXME(bz) This one should not be a
|
||||
// revalidation selector either.
|
||||
|
||||
// Attribute selectors.
|
||||
"div[foo]",
|
||||
"div:not([foo])",
|
||||
|
@ -122,6 +130,12 @@ fn test_revalidation_selectors() {
|
|||
.collect::<Vec<_>>();
|
||||
|
||||
let reference = parse_selectors(&[
|
||||
// ID selectors.
|
||||
"#foo1",
|
||||
"#foo2::before",
|
||||
"#foo3 > span",
|
||||
"#foo1 > span",
|
||||
|
||||
// Attribute selectors.
|
||||
"div[foo]",
|
||||
"div:not([foo])",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue