mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Auto merge of #12918 - hsinewu:12902-typedefs, r=Manishearth
12902 typedefs <!-- Please describe your changes on the following line: --> Using type alias instead of newtype. Removing duplicated implementation, it's already inherited. No more type constructors and foo.0 --- <!-- 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 #12902 (github issue number if applicable). <!-- Either: --> - [X] These changes do not require tests because it's refactoring. <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- 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/12918) <!-- Reviewable:end -->
This commit is contained in:
commit
daee53cb76
5 changed files with 17 additions and 55 deletions
|
@ -1041,16 +1041,16 @@ fn static_assert() {
|
|||
pub fn clone_background_position(&self) -> longhands::background_position::computed_value::T {
|
||||
use values::computed::position::Position;
|
||||
let position = &self.gecko.mImage.mLayers.mFirstElement.mPosition;
|
||||
longhands::background_position::computed_value::T(Position {
|
||||
Position {
|
||||
horizontal: position.mXPosition.into(),
|
||||
vertical: position.mYPosition.into(),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_background_position(&mut self, v: longhands::background_position::computed_value::T) {
|
||||
let position = &mut self.gecko.mImage.mLayers.mFirstElement.mPosition;
|
||||
position.mXPosition = v.0.horizontal.into();
|
||||
position.mYPosition = v.0.vertical.into();
|
||||
position.mXPosition = v.horizontal.into();
|
||||
position.mYPosition = v.vertical.into();
|
||||
self.gecko.mImage.mPositionXCount = 1;
|
||||
self.gecko.mImage.mPositionYCount = 1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue