Repository navigation
Conversation
emilio
left a comment
There was a problem hiding this comment.
This has a couple of build errors, but it's a good start!
Let me know if I can help fixing them somehow.
| where | ||
| W: fmt::Write, | ||
| { | ||
| match (self.0, self.1) { |
There was a problem hiding this comment.
There's no need for match here, just:
let BorderImageRepeat(horizontal, vertical) = *self;|
|
||
| #[inline] | ||
| fn from_computed_value(computed: &Self::ComputedValue) -> Self { | ||
| match (computed) { |
There was a problem hiding this comment.
This is probably still not building, let me know if you need any help setting up the build environment or if I can help somehow, I'd be glad to :)
|
Thanks for the pull request, and welcome! The Servo team is excited to review your changes, and you should hear from @pcwalton (or someone else) soon. |
|
Heads up! This PR modifies the following files:
|
|
@emilio Thanks for the review!!I'll fix it:) |
| outset: SideOffsets2D::zero(), | ||
| repeat_horizontal: convert_repeat_mode(border_style_struct.border_image_repeat.0), | ||
| repeat_vertical: convert_repeat_mode(border_style_struct.border_image_repeat.1), | ||
| repeat_horizontal: convert_repeat_mode(border_style_struct.BorderImageRepeatKeyword.0), |
There was a problem hiding this comment.
This is also not compiling, I think
| where | ||
| W: fmt::Write, | ||
| { | ||
| let BorderImageRepeat(horizontal, vertical) = *self; |
There was a problem hiding this comment.
Now you need to actually serialize them, keeping the code that existed.
There was a problem hiding this comment.
Ok.Thank you for the review.I'll fix it
|
|
||
| #[inline] | ||
| fn from_computed_value(computed: &Self::ComputedValue) -> Self { | ||
| match (computed) { |
There was a problem hiding this comment.
This is probably still not building, let me know if you need any help setting up the build environment or if I can help somehow, I'd be glad to :)
|
@emilio Sorry for interval.I fixed little bit but stuck...I can't solve the build error below.
|
|
Sorry for the huge lag here @chansuke! For the unresolved import, you need to export that value from For Other than that it looks great! |
|
☔ The latest upstream changes (presumably #19568) made this pull request unmergeable. Please resolve the merge conflicts. |
|
@emilio Thank you for your help!!I fixed the error.The remaining error is |
|
@chansuke You only need to write For example, here are documentation comments for servo/components/style/values/specified/border.rs Lines 21 to 32 in f7440bf |
|
@CYBAI Thanks! |
c397ba9 to
64a425f
Compare
|
|
☔ The latest upstream changes (presumably #19618) made this pull request unmergeable. Please resolve the merge conflicts. |
|
Sorry for the lag.I will rebase and fix the error. |
64a425f to
ef597cd
Compare
|
Looks fine, but there are still Geckolib build errors (you can check them with |
|
☔ The latest upstream changes (presumably #19651) made this pull request unmergeable. Please resolve the merge conflicts. |
|
@emilio Hi.I'm blocking with these build errors below.I was wondering if you could give me some suggestions.Thanks. |
ef597cd to
ccef94c
Compare
|
With your patch, About other error messages which is |
dc8cc2a to
bbd0807
Compare
|
@emilio I fixed build errors.I wonder if you could check this. |
emilio
left a comment
There was a problem hiding this comment.
Looks good! Some stuff still could be cleaner, but let me know if you just want to land this and we can tidy this up in followups :)
| #[derive(Clone, Debug, MallocSizeOf, PartialEq, ToCss)] | ||
| pub enum BorderImageRepeat { | ||
| /// `[ stretch | repeat | round | space ]{1,2}` | ||
| Keywords(RepeatKeyword, Option<RepeatKeyword>), |
There was a problem hiding this comment.
This is just an enum with a single variant, so this can be a struct BorderImageRepeat(RepeatKeyword, Option<RepeatKeyword>), right?
| /// An angle rounded and normalized per https://drafts.csswg.org/css-images/#propdef-image-orientation | ||
| #[allow(missing_docs)] | ||
| #[derive(Clone, Copy, Debug, Eq, MallocSizeOf, PartialEq)] | ||
| pub enum Orientation { |
There was a problem hiding this comment.
These changes are from another unrelated commit, so can just go away.
| fn from_computed_value(computed: &Self::ComputedValue) -> Self { | ||
| match (computed.0, computed.1) { | ||
| (horizontal, vertical) => { | ||
| SpecifiedBorderImageRepeat::Keywords(horizontal, Some(vertical)) |
There was a problem hiding this comment.
This can just be:
SpecifiedBorderImageRepeat::Keywords(computed.0, Some(computed.1))Instead of this match expression.
| where | ||
| W: fmt::Write, | ||
| { | ||
| match (self.0, self.1) { |
| SpecifiedBorderImageRepeat::Keywords(horizontal, vertical) => { | ||
| BorderImageRepeat(horizontal, vertical.unwrap_or(horizontal)) | ||
| } | ||
| } |
There was a problem hiding this comment.
I'm wondering, when we only have only one pattern, will it be better to use if let here?
| }; | ||
|
|
||
| let vertical = input.try(RepeatKeyword::parse).ok(); | ||
| Ok(BorderImageRepeat::Keywords(horizontal, vertical)) |
There was a problem hiding this comment.
IMO, the original parse method looks easier to understand for me.
Just curious if you met any difficulty when you tried to use the original method?
let first = RepeatKeyword::parse(input)?;
let second = input.try(RepeatKeyword::parse).ok();
Ok(SpecifiedValue(first, second))bbd0807 to
f3347ef
Compare
f3347ef to
0149703
Compare
|
☔ The latest upstream changes (presumably #19903) made this pull request unmergeable. Please resolve the merge conflicts. |
./mach build -ddoes not report any errors./mach test-tidydoes not report any errorsThis change is