Repository navigation
style: Move -moz-force-broken-image-icon out of mako - #19279
Conversation
|
Heads up! This PR modifies the following files:
|
|
r? @emilio or @Manishearth |
| pub struct MozForceBrokenImageIcon(pub bool); | ||
|
|
||
| impl MozForceBrokenImageIcon { | ||
| /// Return initial value of -moz-script-min-size. |
| impl MozForceBrokenImageIcon { | ||
| /// Return initial value of -moz-script-min-size. | ||
| #[inline] | ||
| pub fn initial_value() -> MozForceBrokenImageIcon { |
There was a problem hiding this comment.
Will it be better to name the initial_value in false?
| impl MozForceBrokenImageIcon { | ||
| /// Return initial value of -moz-script-min-size. | ||
| #[inline] | ||
| pub fn initial_value() -> MozForceBrokenImageIcon { |
There was a problem hiding this comment.
Yup, +1 for naming this method false.
| _context: &ParserContext, | ||
| input: &mut Parser<'i, 't> | ||
| ) -> Result<MozForceBrokenImageIcon, ParseError<'i>> { | ||
| match input.expect_integer()? { |
There was a problem hiding this comment.
Please add a note here saying that we intentionally don't support calc.
|
|
||
| impl From<MozForceBrokenImageIcon> for u8 { | ||
| fn from(v: MozForceBrokenImageIcon) -> u8 { | ||
| match v.0 { |
There was a problem hiding this comment.
What about: if v.0 { 1 } else { 0 }?
|
And glad to see you around again @canaltinova! :) |
4dc2db0 to
2f77dd6
Compare
|
Thanks both of you for reviewing! Also, thanks @emilio! I will be here more often :) |
|
@canaltinova The easiest way is often to add an underscore after the keyword, i.e. name it |
|
@KiChjang Yeah, for example, we used that solution for |
2f77dd6 to
b2df766
Compare
|
Anyway, I'm going with |
|
📌 Commit b2df766 has been approved by |
style: Move -moz-force-broken-image-icon out of mako <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix part of #19015. <!-- Either: --> - [X] These changes do not require tests because these are just refactoring. <!-- 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/19279) <!-- 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 |
./mach build -ddoes not report any errors./mach test-tidydoes not report any errorsThis change is