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 upSupport creating StyleAnimationValue objects from Servo #13553
Conversation
highfive
commented
Oct 3, 2016
|
Thanks for the pull request, and welcome! The Servo team is excited to review your changes, and you should hear from @mbrubeck (or someone else) soon. |
highfive
commented
Oct 3, 2016
|
Heads up! This PR modifies the following files:
|
highfive
commented
Oct 3, 2016
|
@bors-servo delegate+ feel free to r=me whenever you think it's necessary. Try to get both sides landed at around the same time (if not, no big deal, I can cherry pick when I do the next sync) |
|
|
|
@bors-servo: try |
Support creating StyleAnimationValue objects from Servo These are the servo-side changes for [bug 1302949](https://bugzilla.mozilla.org/show_bug.cgi?id=1302949#c59). @Manishearth has already reviewed them there. --- - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix [bug 1302949](https://bugzilla.mozilla.org/show_bug.cgi?id=1302949#c59) - [X] These changes do not require tests because there are existing tests for this in mozilla-central <!-- 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/13553) <!-- Reviewable:end -->
|
|
|
|
I'm hitting
This used to work. I wonder what changed. |
|
Possibly 89a29a7 I guess? |
|
@SimonSapin do you have any suggestions how I might fix this build error? Specifically, this line used to work but when I went to land it looks like it has bitrotted because https://github.com/servo/servo/pull/13553/files#diff-956c49c2a32c332249de4800e44bfcadR74 |
|
I spoke to @wafflespeanut and @Manishearth on IRC and it looks like I need to use https://hg.mozilla.org/mozilla-central/rev/5db982657c9b2606d9572fced222741cffb136c1 And if that doesn't use deep equality we'll end up doing unnecessary work when we update animations and fail tests that check the number of change notifications we dispatch. |
|
I had a look into doing this but quickly remembered I know nothing about rust. I tried doing the following: impl PartialEq for GeckoDeclarationBlock {
fn eq(&self, other: &GeckoDeclarationBlock) -> bool {
let unwrap_declarations = |block: &GeckoDeclarationBlock| {
match block.declarations {
None => None,
Some(ref ptr) => Some(*ptr.read())
}
};
unwrap_declarations(self) == unwrap_declarations(other)
}
}But ran into lifetime issues, I think because |
|
Just unroll it match (*self, *other) {
(None, None) => true,
(Some(ref s), Some(ref other)) => s.read() == other.read(),
_ => false,
} |
|
Ooh! That's a lot nicer. It didn't work as-is but I tweaked it as follows: fn eq(&self, other: &GeckoDeclarationBlock) -> bool {
match (self.declarations, other.declarations) {
(None, None) => true,
(Some(ref s), Some(ref other)) => *s.read() == *other.read(),
_ => false,
}
}And I still get:
|
|
Oh, and if I don't dereference the
|
|
Try making it |
|
It works! Thank you! |
|
I finally fixed the all the bitrot. Then I re-pulled and I've been bitrotted again. This time by 540ba90. |
|
Oh, actually, it's not bitrot. That changeset just broke building on Windows. |
|
@bors-servo: try |
|
@bors-servo r=Manishearth |
|
|
|
|
Support creating StyleAnimationValue objects from Servo These are the servo-side changes for [bug 1302949](https://bugzilla.mozilla.org/show_bug.cgi?id=1302949#c59). @Manishearth has already reviewed them there. --- - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix [bug 1302949](https://bugzilla.mozilla.org/show_bug.cgi?id=1302949#c59) - [X] These changes do not require tests because there are existing tests for this in mozilla-central <!-- 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/13553) <!-- Reviewable:end -->
|
I fixed the merge conflicts but it looks like I've been bitrotted yet again. I don't have a build environment on this computer so this might have to wait a couple more days. |
|
|
| @@ -338,6 +374,54 @@ pub extern "C" fn Servo_StyleSet_Drop(data: RawServoStyleSetOwned) -> () { | |||
| let _ = data.into_box::<PerDocumentStyleData>(); | |||
| } | |||
|
|
|||
|
|
|||
| #[no_mangle] | |||
| pub extern "C" fn Servo_ParseProperty(property_bytes: *const u8, | |||
This comment has been minimized.
This comment has been minimized.
Manishearth
Oct 9, 2016
Member
The signature for Servo_ParseProperty doesn't match the generated bindings
This comment has been minimized.
This comment has been minimized.
Manishearth
Oct 9, 2016
Member
It seems like the generated bindings were hand-written here, since the signature in ServoBindingList.h is correct. I'll fix this.
This comment has been minimized.
This comment has been minimized.
birtles
Oct 9, 2016
Author
Contributor
That's just one of a bunch of things are now broken but used to work. I wish bors-servo had got around to merging it a few days ago when it applied cleanly. I'll look into it on Tuesday.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Manishearth
Oct 9, 2016
Member
Okay, wfm. That was due to a bors bug I need to fix, had a PR open for it iirc.
This comment has been minimized.
This comment has been minimized.
…aration block; r=Manishearth The property may be a shorthand property in which case the declaration block will contain the expanded longhand properties and values. MozReview-Commit-ID: KxqlYgbIZqL
…n blocks; r=Manishearth MozReview-Commit-ID: EtX2oLXdGNm
…le value; r=Manishearth MozReview-Commit-ID: 59CCT0P4CBm
…nishearth MozReview-Commit-ID: AbX0PCjjEM6
|
@bors-servo r+ I think I fixed it |
|
|
|
Thanks again! |
Support creating StyleAnimationValue objects from Servo These are the servo-side changes for [bug 1302949](https://bugzilla.mozilla.org/show_bug.cgi?id=1302949#c59). @Manishearth has already reviewed them there. --- - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix [bug 1302949](https://bugzilla.mozilla.org/show_bug.cgi?id=1302949#c59) - [X] These changes do not require tests because there are existing tests for this in mozilla-central <!-- 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/13553) <!-- Reviewable:end -->
|
|
birtles commentedOct 3, 2016
•
edited by larsbergstrom
These are the servo-side changes for bug 1302949. @Manishearth has already reviewed them there.
./mach build -ddoes not report any errors./mach test-tidydoes not report any errorsThis change is