New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
style: Custom properties cleanup. #18745
Conversation
This will give a nicer error message, plus it's more compact.
Heads up! This PR modifies the following files:
|
@bors-servo r+ |
📌 Commit 089d5ee has been approved by |
@@ -607,7 +607,7 @@ fn substitute_one( | |||
if invalid.contains(name) { | |||
return Err(()); | |||
} | |||
let computed_value = if specified_value.references.map(|set| set.is_empty()) == Some(false) { | |||
let computed_value = if specified_value.references.map_or(false, |set| !set.is_empty()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not equivalent to the previous behaviour. Is that intentional?
@bors-servo: r- until my question is answered. |
@bors-servo: r=nox |
📌 Commit 089d5ee has been approved by |
@bors-servo p=1 |
style: Custom properties cleanup. Use less unwrap and custom types in custom properties. The idea is for this to shed some light in https://bugzilla.mozilla.org/show_bug.cgi?id=1403845. <!-- 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/18745) <!-- Reviewable:end -->
💔 Test failed - mac-rel-wpt1 |
@bors-servo retry |
style: Custom properties cleanup. Use less unwrap and custom types in custom properties. The idea is for this to shed some light in https://bugzilla.mozilla.org/show_bug.cgi?id=1403845. <!-- 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/18745) <!-- Reviewable:end -->
☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css1, mac-rel-css2, mac-rel-wpt1, mac-rel-wpt2, mac-rel-wpt3, mac-rel-wpt4, windows-msvc-dev |
In servo#18745, I replaced a few manual iterations over `index` with the iterator, and it changed the behavior of `layout/style/test/test_variables_order.html`, since it turns out that the iterator iterates right to left. I think this is just an accident that happened due to inconsistencies in how we were iterating over it, and that our behavior was inconsistent (since we iterated rtl in some cases, but ltr in others seems like it'd be inconsistent depending on the depth of the tree and different stuff). This brings back the expected behavior again, and ensures we iterate over a consistent order every time.
In servo#18745, I replaced a few manual iterations over `index` with the iterator, and it changed the behavior of `layout/style/test/test_variables_order.html`, since it turns out that the iterator iterates right to left. I think this is just an accident that happened due to inconsistencies in how we were iterating over it, and that our behavior was inconsistent (since we iterated rtl in some cases, but ltr in others seems like it'd be inconsistent depending on the depth of the tree and different stuff). This brings back the expected behavior again, and ensures we iterate over a consistent order every time.
style: Iterate in the expected order in the custom_properties module. In #18745, I replaced a few manual iterations over `index` with the iterator, and it changed the behavior of `layout/style/test/test_variables_order.html`, since it turns out that the iterator iterates right to left. I think this is just an accident that happened due to inconsistencies in how we were iterating over it, and that our behavior was inconsistent (since we iterated rtl in some cases, but ltr in others seems like it'd be inconsistent depending on the depth of the tree and different stuff). This brings back the expected behavior again, and ensures we iterate over a consistent order every time. <!-- 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/18761) <!-- Reviewable:end -->
In servo#18745, I replaced a few manual iterations over `index` with the iterator, and it changed the behavior of `layout/style/test/test_variables_order.html`, since it turns out that the iterator iterates right to left. I think this is just an accident that happened due to inconsistencies in how we were iterating over it, and that our behavior was inconsistent (since we iterated rtl in some cases, but ltr in others seems like it'd be inconsistent depending on the depth of the tree and different stuff). This brings back the expected behavior again, and ensures we iterate over a consistent order every time.
Use less unwrap and custom types in custom properties.
The idea is for this to shed some light in https://bugzilla.mozilla.org/show_bug.cgi?id=1403845.
This change is