mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
style: Ensure modified_reset is set when {mutate,take}_reset_struct is called.
Bug: 1463603 Reviewed-by: heycam MozReview-Commit-ID: 8mqVb7kl0ok
This commit is contained in:
parent
5fc6b47d74
commit
6306cc7e2d
1 changed files with 4 additions and 2 deletions
|
@ -3199,6 +3199,7 @@ impl<'a> StyleBuilder<'a> {
|
||||||
% endif
|
% endif
|
||||||
% endif
|
% endif
|
||||||
% endfor
|
% endfor
|
||||||
|
<% del property %>
|
||||||
|
|
||||||
/// Inherits style from the parent element, accounting for the default
|
/// Inherits style from the parent element, accounting for the default
|
||||||
/// computed values that need to be provided as well.
|
/// computed values that need to be provided as well.
|
||||||
|
@ -3256,7 +3257,7 @@ impl<'a> StyleBuilder<'a> {
|
||||||
|
|
||||||
/// Gets a mutable view of the current `${style_struct.name}` style.
|
/// Gets a mutable view of the current `${style_struct.name}` style.
|
||||||
pub fn mutate_${style_struct.name_lower}(&mut self) -> &mut style_structs::${style_struct.name} {
|
pub fn mutate_${style_struct.name_lower}(&mut self) -> &mut style_structs::${style_struct.name} {
|
||||||
% if not property.style_struct.inherited:
|
% if not style_struct.inherited:
|
||||||
self.modified_reset = true;
|
self.modified_reset = true;
|
||||||
% endif
|
% endif
|
||||||
self.${style_struct.ident}.mutate()
|
self.${style_struct.ident}.mutate()
|
||||||
|
@ -3264,7 +3265,7 @@ impl<'a> StyleBuilder<'a> {
|
||||||
|
|
||||||
/// Gets a mutable view of the current `${style_struct.name}` style.
|
/// Gets a mutable view of the current `${style_struct.name}` style.
|
||||||
pub fn take_${style_struct.name_lower}(&mut self) -> UniqueArc<style_structs::${style_struct.name}> {
|
pub fn take_${style_struct.name_lower}(&mut self) -> UniqueArc<style_structs::${style_struct.name}> {
|
||||||
% if not property.style_struct.inherited:
|
% if not style_struct.inherited:
|
||||||
self.modified_reset = true;
|
self.modified_reset = true;
|
||||||
% endif
|
% endif
|
||||||
self.${style_struct.ident}.take()
|
self.${style_struct.ident}.take()
|
||||||
|
@ -3288,6 +3289,7 @@ impl<'a> StyleBuilder<'a> {
|
||||||
StyleStructRef::Borrowed(self.reset_style.${style_struct.name_lower}_arc());
|
StyleStructRef::Borrowed(self.reset_style.${style_struct.name_lower}_arc());
|
||||||
}
|
}
|
||||||
% endfor
|
% endfor
|
||||||
|
<% del style_struct %>
|
||||||
|
|
||||||
/// Returns whether this computed style represents a floated object.
|
/// Returns whether this computed style represents a floated object.
|
||||||
pub fn floated(&self) -> bool {
|
pub fn floated(&self) -> bool {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue