Skip to content

Commit

Permalink
style: Generate combined transform just once.
Browse files Browse the repository at this point in the history
  • Loading branch information
emilio committed Feb 10, 2019
1 parent eef9e24 commit 258217a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions components/style/properties/cascade.rs
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -629,6 +629,10 @@ impl<'a, 'b: 'a> Cascade<'a, 'b> {


#[cfg(feature = "gecko")] #[cfg(feature = "gecko")]
{ {
if let Some(display) = builder.get_box_if_mutated() {
display.generate_combined_transform();
}

if let Some(bg) = builder.get_background_if_mutated() { if let Some(bg) = builder.get_background_if_mutated() {
bg.fill_arrays(); bg.fill_arrays();
} }
Expand Down
5 changes: 5 additions & 0 deletions components/style/properties/gecko.mako.rs
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -3023,6 +3023,11 @@ fn static_assert() {
will-change shape-outside contain touch-action will-change shape-outside contain touch-action
translate scale""" %> translate scale""" %>
<%self:impl_trait style_struct_name="Box" skip_longhands="${skip_box_longhands}"> <%self:impl_trait style_struct_name="Box" skip_longhands="${skip_box_longhands}">
#[inline]
pub fn generate_combined_transform(&mut self) {
unsafe { bindings::Gecko_StyleDisplay_GenerateCombinedTransform(&mut self.gecko) };
}

#[inline] #[inline]
pub fn set_display(&mut self, v: longhands::display::computed_value::T) { pub fn set_display(&mut self, v: longhands::display::computed_value::T) {
self.gecko.mDisplay = v; self.gecko.mDisplay = v;
Expand Down

0 comments on commit 258217a

Please sign in to comment.