aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauricio Collares <mau@ric.io>2016-04-04 23:17:49 -0300
committerMauricio Collares <mau@ric.io>2016-04-05 00:21:48 -0300
commit281e385ab2f4ec71ffc3332cfef7babe38e21538 (patch)
treed1ecd3616ce3545ff4666c028211ccddd76fa035
parent841aef06e0c8a9009e38af00ed9c5dfd8cc681ba (diff)
downloadservo-281e385ab2f4ec71ffc3332cfef7babe38e21538.tar.gz
servo-281e385ab2f4ec71ffc3332cfef7babe38e21538.zip
Rename PositionOffsets to Position
-rw-r--r--components/layout/incremental.rs4
-rw-r--r--components/style/animation.rs16
-rw-r--r--components/style/properties.mako.rs14
3 files changed, 17 insertions, 17 deletions
diff --git a/components/layout/incremental.rs b/components/layout/incremental.rs
index 09aba3adb46..32c745dcbe5 100644
--- a/components/layout/incremental.rs
+++ b/components/layout/incremental.rs
@@ -211,8 +211,8 @@ pub fn compute_damage(old: Option<&Arc<ServoComputedValues>>, new: &ServoCompute
get_flex.flex_direction
]) || add_if_not_equal!(old, new, damage,
[ REPAINT, STORE_OVERFLOW, REFLOW_OUT_OF_FLOW ], [
- get_positionoffsets.top, get_positionoffsets.left,
- get_positionoffsets.right, get_positionoffsets.bottom
+ get_position.top, get_position.left,
+ get_position.right, get_position.bottom
]) || add_if_not_equal!(old, new, damage,
[ REPAINT ], [
get_color.color, get_background.background_color,
diff --git a/components/style/animation.rs b/components/style/animation.rs
index c44e8cc42b8..6cf13479183 100644
--- a/components/style/animation.rs
+++ b/components/style/animation.rs
@@ -154,12 +154,12 @@ impl PropertyAnimation {
[BorderSpacing; get_inheritedtable; border_spacing],
[BorderTopColor; get_border; border_top_color],
[BorderTopWidth; get_border; border_top_width],
- [Bottom; get_positionoffsets; bottom],
+ [Bottom; get_position; bottom],
[Color; get_color; color],
[FontSize; get_font; font_size],
[FontWeight; get_font; font_weight],
[Height; get_box; height],
- [Left; get_positionoffsets; left],
+ [Left; get_position; left],
[LineHeight; get_inheritedbox; line_height],
[MarginBottom; get_margin; margin_bottom],
[MarginLeft; get_margin; margin_left],
@@ -176,9 +176,9 @@ impl PropertyAnimation {
[PaddingLeft; get_padding; padding_left],
[PaddingRight; get_padding; padding_right],
[PaddingTop; get_padding; padding_top],
- [Right; get_positionoffsets; right],
+ [Right; get_position; right],
[TextIndent; get_inheritedtext; text_indent],
- [Top; get_positionoffsets; top],
+ [Top; get_position; top],
[VerticalAlign; get_box; vertical_align],
[Visibility; get_inheritedbox; visibility],
[Width; get_box; width],
@@ -252,12 +252,12 @@ impl PropertyAnimation {
[BorderSpacing; mutate_inheritedtable; border_spacing],
[BorderTopColor; mutate_border; border_top_color],
[BorderTopWidth; mutate_border; border_top_width],
- [Bottom; mutate_positionoffsets; bottom],
+ [Bottom; mutate_position; bottom],
[Color; mutate_color; color],
[FontSize; mutate_font; font_size],
[FontWeight; mutate_font; font_weight],
[Height; mutate_box; height],
- [Left; mutate_positionoffsets; left],
+ [Left; mutate_position; left],
[LineHeight; mutate_inheritedbox; line_height],
[MarginBottom; mutate_margin; margin_bottom],
[MarginLeft; mutate_margin; margin_left],
@@ -274,10 +274,10 @@ impl PropertyAnimation {
[PaddingLeft; mutate_padding; padding_left],
[PaddingRight; mutate_padding; padding_right],
[PaddingTop; mutate_padding; padding_top],
- [Right; mutate_positionoffsets; right],
+ [Right; mutate_position; right],
[TextIndent; mutate_inheritedtext; text_indent],
[TextShadow; mutate_inheritedtext; text_shadow],
- [Top; mutate_positionoffsets; top],
+ [Top; mutate_position; top],
[Transform; mutate_effects; transform],
[VerticalAlign; mutate_box; vertical_align],
[Visibility; mutate_inheritedbox; visibility],
diff --git a/components/style/properties.mako.rs b/components/style/properties.mako.rs
index 51346788d40..fb892e3b864 100644
--- a/components/style/properties.mako.rs
+++ b/components/style/properties.mako.rs
@@ -460,7 +460,7 @@ pub mod longhands {
${predefined_type("outline-offset", "Length", "Au(0)")}
- ${new_style_struct("PositionOffsets", is_inherited=False, gecko_name="nsStylePosition")}
+ ${new_style_struct("Position", is_inherited=False, gecko_name="nsStylePosition")}
% for side in ["top", "right", "bottom", "left"]:
${predefined_type(side, "LengthOrPercentageOrAuto",
@@ -6462,7 +6462,7 @@ impl ServoComputedValues {
#[inline]
pub fn logical_position(&self) -> LogicalMargin<computed::LengthOrPercentageOrAuto> {
// FIXME(SimonSapin): should be the writing mode of the containing block, maybe?
- let position_style = self.get_positionoffsets();
+ let position_style = self.get_position();
LogicalMargin::from_physical(self.writing_mode, SideOffsets2D::new(
position_style.top,
position_style.right,
@@ -7074,11 +7074,11 @@ pub fn modify_style_for_text(style: &mut Arc<ServoComputedValues>) {
// We leave the `position` property set to `relative` so that we'll still establish a
// containing block if needed. But we reset all position offsets to `auto`.
let mut style = Arc::make_mut(style);
- let mut position_offsets = Arc::make_mut(&mut style.positionoffsets);
- position_offsets.top = computed::LengthOrPercentageOrAuto::Auto;
- position_offsets.right = computed::LengthOrPercentageOrAuto::Auto;
- position_offsets.bottom = computed::LengthOrPercentageOrAuto::Auto;
- position_offsets.left = computed::LengthOrPercentageOrAuto::Auto;
+ let mut position = Arc::make_mut(&mut style.position);
+ position.top = computed::LengthOrPercentageOrAuto::Auto;
+ position.right = computed::LengthOrPercentageOrAuto::Auto;
+ position.bottom = computed::LengthOrPercentageOrAuto::Auto;
+ position.left = computed::LengthOrPercentageOrAuto::Auto;
}
if style.padding.padding_top != computed::LengthOrPercentage::Length(Au(0)) ||