Skip to content
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

Merged
merged 5 commits into from Oct 5, 2017

Conversation

emilio
Copy link
Member

@emilio emilio commented Oct 4, 2017

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 Reviewable

@highfive
Copy link

highfive commented Oct 4, 2017

Heads up! This PR modifies the following files:

  • @bholley: components/style/custom_properties.rs
  • @canaltinova: components/style/custom_properties.rs

@highfive
Copy link

highfive commented Oct 4, 2017

warning Warning warning

  • These commits modify style code, but no tests are modified. Please consider adding a test!

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Oct 4, 2017
@nox
Copy link
Contributor

nox commented Oct 4, 2017

@bors-servo r+

@bors-servo
Copy link
Contributor

📌 Commit 089d5ee has been approved by nox

@highfive highfive assigned nox and unassigned cbrewster Oct 4, 2017
@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Oct 4, 2017
@@ -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()) {
Copy link
Member

@jdm jdm Oct 4, 2017

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?

@jdm
Copy link
Member

jdm commented Oct 4, 2017

@bors-servo: r- until my question is answered.

@jdm jdm added S-awaiting-review There is new code that needs to be reviewed. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Oct 4, 2017
@jdm
Copy link
Member

jdm commented Oct 4, 2017

@bors-servo: r=nox
Durr, never mind. Boolean logic is hard.

@bors-servo
Copy link
Contributor

📌 Commit 089d5ee has been approved by nox

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Oct 4, 2017
@bholley
Copy link
Contributor

bholley commented Oct 4, 2017

@bors-servo p=1

@bors-servo
Copy link
Contributor

⌛ Testing commit 089d5ee with merge 05591d5...

bors-servo pushed a commit that referenced this pull request Oct 5, 2017
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 -->
@bors-servo
Copy link
Contributor

💔 Test failed - mac-rel-wpt1

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Oct 5, 2017
@jdm
Copy link
Member

jdm commented Oct 5, 2017

@bors-servo retry
Build timeout

@bors-servo
Copy link
Contributor

⌛ Testing commit 089d5ee with merge 9bf299b...

bors-servo pushed a commit that referenced this pull request Oct 5, 2017
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 -->
@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-tests-failed The changes caused existing tests to fail. labels Oct 5, 2017
@bors-servo
Copy link
Contributor

☀️ 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
Approved by: nox
Pushing 9bf299b to master...

@bors-servo bors-servo merged commit 089d5ee into servo:master Oct 5, 2017
@highfive highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Oct 5, 2017
emilio added a commit to emilio/servo that referenced this pull request Oct 5, 2017
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.
emilio added a commit to emilio/servo that referenced this pull request Oct 5, 2017
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.
bors-servo pushed a commit that referenced this pull request Oct 5, 2017
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 -->
avadacatavra pushed a commit to avadacatavra/servo that referenced this pull request Oct 17, 2017
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants