mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Auto merge of #14223 - Manishearth:fix-logical-cascade, r=emilio
Delegate logical bitfield setters to physical to fix cascade (fixes #14222) Five minutes early for "tomorrow", _shrug_. I'm not entirely sure of this fix. It depends on properties going through the cascade in source order all else being the same. I think that's the case. Fixes wikipedia though. r? @emilio or @SimonSapin <!-- 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/14223) <!-- Reviewable:end -->
This commit is contained in:
commit
8c6703637f
2 changed files with 27 additions and 5 deletions
|
@ -150,6 +150,7 @@ pub mod animated_properties {
|
|||
// TODO(SimonSapin): Convert this to a syntax extension rather than a Mako template.
|
||||
// Maybe submit for inclusion in libstd?
|
||||
mod property_bit_field {
|
||||
use logical_geometry::WritingMode;
|
||||
|
||||
pub struct PropertyBitField {
|
||||
storage: [u32; (${len(data.longhands)} - 1 + 32) / 32]
|
||||
|
@ -182,6 +183,24 @@ mod property_bit_field {
|
|||
self.set(${i})
|
||||
}
|
||||
% endif
|
||||
% if property.logical:
|
||||
#[allow(non_snake_case)]
|
||||
pub fn get_physical_${property.ident}(&self, wm: WritingMode) -> bool {
|
||||
<%helpers:logical_setter_helper name="${property.name}">
|
||||
<%def name="inner(physical_ident)">
|
||||
self.get_${physical_ident}()
|
||||
</%def>
|
||||
</%helpers:logical_setter_helper>
|
||||
}
|
||||
#[allow(non_snake_case)]
|
||||
pub fn set_physical_${property.ident}(&mut self, wm: WritingMode) {
|
||||
<%helpers:logical_setter_helper name="${property.name}">
|
||||
<%def name="inner(physical_ident)">
|
||||
self.set_${physical_ident}()
|
||||
</%def>
|
||||
</%helpers:logical_setter_helper>
|
||||
}
|
||||
% endif
|
||||
% endfor
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue