Permalink
Browse files

style: Generate combined transform just once.

  • Loading branch information...
emilio committed Feb 4, 2019
1 parent eef9e24 commit 258217a36904a191490346ea5e706b0eeb048b23
Showing with 9 additions and 0 deletions.
  1. +4 −0 components/style/properties/cascade.rs
  2. +5 −0 components/style/properties/gecko.mako.rs
@@ -629,6 +629,10 @@ impl<'a, 'b: 'a> Cascade<'a, 'b> {

#[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() {
bg.fill_arrays();
}
@@ -3023,6 +3023,11 @@ fn static_assert() {
will-change shape-outside contain touch-action
translate scale""" %>
<%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]
pub fn set_display(&mut self, v: longhands::display::computed_value::T) {
self.gecko.mDisplay = v;

0 comments on commit 258217a

Please sign in to comment.