Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upstyle: Sync changes from mozilla-central. #22645
Conversation
highfive
commented
Jan 7, 2019
|
Heads up! This PR modifies the following files:
|
highfive
commented
Jan 7, 2019
This is a first step to share LengthOrPercentage representation between Rust and Gecko. We need to preserve whether the value came from a calc() expression, for now at least, since we do different things depending on whether we're calc or not right now. See w3c/csswg-drafts#3482 and dependent bugs for example. That means that the gecko conversion code needs to handle calc() in a bit of an awkward way until I change it to not be needed (patches for that incoming in the next few weeks I hope). I need to add a hack to exclude other things from the PartialEq implementation because the new conversion code is less lossy than the old one, and we relied on the lousiness in AnimationValue comparison (in order to start transitions and such, in [1] for example). I expect to remove that manual PartialEq implementation as soon as I'm done with the conversion. The less lossy conversion does fix a few serialization bugs for animation values though, like not loosing 0% values in calc() when interpolating lengths and percentages, see the two modified tests: * property-types.js * test_animation_properties.html Differential Revision: https://phabricator.services.mozilla.com/D15793
57d351d
to
d94faf9
|
I think this is mostly straight-forward, but ac8317a probably deserves some review. r? @jdm / @nox / @SimonSapin for that? @bors-servo try |
style: Sync changes from mozilla-central. See each individual commit for details. <!-- 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/22645) <!-- Reviewable:end -->
|
|
|
Well that's a lot of broken tests, but the few I took a look at was just a logic error in margin collapsing which I introduced. Should be fixed now. @bors-servo try=wpt |
style: Sync changes from mozilla-central. See each individual commit for details. <!-- 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/22645) <!-- Reviewable:end -->
|
@bors-servo try=wpt
|
style: Sync changes from mozilla-central. See each individual commit for details. <!-- 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/22645) <!-- Reviewable:end -->
|
|
|
Alright, those were two expected new passes \o/. |
|
The hash of the interesting commit now is 83f0286. |
|
cc @mbrubeck, which I forgot about in my previous comment, in case you feel like it :) |
|
@bors-servo retry |
style: Sync changes from mozilla-central. See each individual commit for details. <!-- 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/22645) <!-- Reviewable:end -->
|
|
|
I found this test case
|
This also fixes a bunch of calc handling issues and such. Also remove tests that no longer compile and are covered by WPT.
It does not represent `<length> | <percentage>`, but `<length-percentage>`, so `LengthOrPercentage` is not the right name. This patch is totally autogenerated using: rg 'LengthOrPercentage' servo | cut -d : -f 1 | sort | uniq > files for file in $(cat files); do sed -i "s#LengthOrPercentage#LengthPercentage#g" $file; done Differential Revision: https://phabricator.services.mozilla.com/D15812
lop is not an acceptable variable name for LengthPercentage. Differential Revision: https://phabricator.services.mozilla.com/D15813
|
@bors-servo r=emilio,mbrubeck
diff --git a/components/layout/floats.rs b/components/layout/floats.rs
index e6a9b048a3..5a58e27f9d 100644
--- a/components/layout/floats.rs
+++ b/components/layout/floats.rs
@@ -551,7 +551,7 @@ impl SpeculatedFloatPlacement {
let fixed = match inline_size {
LengthPercentageOrAuto::Auto => false,
LengthPercentageOrAuto::LengthPercentage(ref lp) => {
- lp.is_definitely_zero() || lp.maybe_to_used_value(None).is_none()
+ lp.is_definitely_zero() || lp.maybe_to_used_value(None).is_some()
},
};
if !fixed { |
|
|
|
|
|
style: Sync changes from mozilla-central. See each individual commit for details. <!-- 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/22645) <!-- Reviewable:end -->
|
|
emilio commentedJan 7, 2019
•
edited by SimonSapin
See each individual commit for details.
This change is